I am working on an application that uses a two-pane layout on larger devices, similar to what is described here . Brief description of the layout; one panel contains a list of options, and the other displays detailed information about the option selected in another panel.
Now, when the parameter is selected, the ripple effect appears, which is observed when other elements are selected (buttons, flags, etc.), but after the animation is completed, the element returns to its previous color. I want to keep the selection from the ripples after the animation is completed, and it is difficult for me to understand how to do it.
This is what my wave background looks like. The focus selector does nothing - could not figure out how to actually give the elements the focuses. I also tried using the selected selector, but this happens immediately, overriding the ripple.
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorAccent"> <item android:id="@android:id/mask" android:drawable="@android:color/black" /> <item> <selector> <item android:state_focused="true" android:drawable="@color/accent" /> </selector> </item> </ripple>
To repeat the repetition, my question is: is it possible to have a ripple effect, followed by a highlighted selection, and if so, how?
source share