6
サポートライブラリを使用してリップルアニメーションを実現する方法
ボタンをクリックしたときにリップルアニメーションを追加しようとしています。以下のようにしましたが、minSdKVersionを21にする必要があります。 ripple.xml <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight"> <item> <shape android:shape="rectangle"> <solid android:color="?android:colorAccent" /> </shape> </item> </ripple> ボタン <com.devspark.robototextview.widget.RobotoButton android:id="@+id/loginButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/ripple" android:text="@string/login_button" /> デザインライブラリとの下位互換性を確保したいと考えています。 これはどのように行うことができますか?