J'essaye de créer une ondulation quand mon bouton est cliqué en utilisant le RippleEffect project, cependant chaque fois que je cours le code l'application se bloque. Comment puis-je réparer ça? Sinon, existe-t-il un moyen plus facile d'obtenir une ondulation lorsqu'un bouton est cliqué? S'il vous plaît aider si possible. Je vous remercie!Comment utiliser RippleView pour créer des ondulations?
<RelativeLayout
android:id="@+id/topPanel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<com.andexert.library.RippleView
android:layout_width="match_parent"
android:layout_height="95dp">
// Button 1
<Button
android:id="@+id/name1"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="95dp"
android:gravity="center"
android:background="@drawable/button_border"
android:textSize="17dp"
android:textAllCaps="false"
android:textStyle="normal|bold" />
// TIME 1
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/name1"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:paddingBottom="4dp"
android:textSize="18dp"
android:textColor="@android:color/darker_gray"
android:elevation="2dp"
android:id="@+id/editText1" />
// NAME 1
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18dp"
android:text=" "
android:elevation="2dp"
android:layout_alignBaseline="@+id/name1"
android:layout_alignBottom="@+id/name1"
android:layout_centerHorizontal="true"
android:cursorVisible="false" />
</com.andexert.library.RippleView>
</RelativeLayout> // End Left Side
Essayez cette http://stackoverflow.com/documentation/android/124/material-design-for-all-android-versions/14200/rippledrawable#t=201611040354215769953 –
Afficher la sortie logcat. –