Pierrefelipelakeisha's Profile

60
Points

Questions
10

Answers
4

  • If I understand your intention correctly then you wold like to change the background once the user presses the button and change it back to normal once the user releases the button. To solve this you have two option (IMHO):

    Option 1 (simple, fast):

    Add a ripple effect which uses standard Android mechanisms. See answer to this question: Add ripple effect to my button with button background color?

    Option 2 (more overhead, takes longer, requires coding):

    Android calls onLongClick() when the user releases the button, thus at the end of the long click.

    A long click is defined as the time (configurable) between the motion events ACTION_DOWN and ACTION_UP, thus button pressed and button released. Thus your function gets called on ACTION_UP and never called a second time (Android does not call the function on ACTION_DOWN), thus the background color does not revert back.

    If you like to change the background then you need to implement and set a GestureDetector and handle the ACTION_DOWN and ACTION_UP in your code. You may use GestureDetector.SimpleOnGestureListener and override only those motion events that your code needs.

    In GestureDetector.SimpleOnGestureListener.onDown() your code sets the background, on GestureDetector.SimpleOnGestureListener.onLongPress() revert the background color. Be aware that this background change would also appear on all other button actions as well because every button action starts with onDown. You need to revert to normal color for other actions as well.

    • 10 views
    • 2 answers
    • 0 votes

  • or is there another standard way to apply certs at the application layer?

    Yes, for TLS and mTLS between applications within your cluster, I would consider to use a service mesh, e.g. Istio (with mTLS) or Linkerd (with mTLS). With a service mesh you get TLS encryption managed for you, between Pod to Pod – but your application does not need to manage any certificates.

    • 9 views
    • 1 answers
    • 0 votes
  • Its an opensource library with MIT license.

    There is no paid version for this library – but you can donate. May be you should use the library and donate for what it gives you.

    The donate button is located at the bottom left corner –

    https://nodemailer.com/about/

    • 10 views
    • 1 answers
    • 0 votes
  • If you will use GraphQL it is very easy.

    Postman has GraphQL support. Check its docs.

    query restaurants {   restaurants {     id     name     categoria {       id       name     }   } } 

    You can use complex queries with REST API too.

    https://strapi.io/documentation/v3.x/content-api/parameters.html#deep-filtering

    For example:

    /restaurants?_where[0][stars]=1&_where[1][pricing_lte]=20 
    • 13 views
    • 1 answers
    • 0 votes