1
次のコードを使用してボタンに波及効果を追加しましたが、周りの境界線が消えてボタンが背景とマージされました。私はそれを区別するためにそれの周りに境界線を追加したいと思います。アンドロイドのリップルエフェクトボタンの周りに枠線を追加していますか?
これは私のボタンのコードです:
<Button
android:id="@+id/email_sign_in_button"
style="?android:textAppearanceLarge"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:textColor="#ffffff"
android:text="@string/action_sign_in" />
これは、ボタンの描画可能です:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="1dp"
android:bottomRightRadius="1dp"
android:radius="0.1dp"
android:topLeftRadius="1dp"
android:topRightRadius="1dp" />
<solid android:color="@android:color/transparent" />
<stroke
android:width="1dp"
android:color="#E8E6E7" />
</shape>