Answer the question
In order to leave comments, you need to log in
The Ripple effect is played in reverse, how to fix it?
Good
Ripple on 5 is played normally, but I tried it on Android 8 and 9, it plays differently.
9 - first everything changes color, and then converges to a point in the center.
8 - a dot appears in the center, and when I release it, a wave appears
apply the effect on the LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/find_city_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:padding="8dp"
android:clickable="true"
android:background="@drawable/ripple"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name_en_city_adapter"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_country_adapter"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="@color/colorAccent"
android:radius="8dp"
tools:targetApi="lollipop">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/colorPrimary" /> <!-- background color -->
<corners android:radius="8dp" />
<stroke
android:width="4dp"
android:color="@android:color/darker_gray" />
</shape>
</item>
</ripple>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question