@Neonoviiwolf
Flutter developer

Эффект Ripple проигрывается наоборот, как поправить?

Доброго
Ripple на 5 проигрывается нормально, но на 8 и 9 андроиде попробовал, он проигрывается иначе.
9 - сначала всё меняет цвет, а потом сходится в точку в центре.
8 - появляется точка в центре, а когда отпускаю, появляется волна
применяю эффект на 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>
  • Вопрос задан
  • 53 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы