Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Bahan https://goo.gl/D2yHbp
- # attrs.xml
- <attr name="mrl_rippleColor" format="color" localization="suggested" />
- <attr name="mrl_rippleDimension" format="dimension" localization="suggested" />
- <attr name="mrl_rippleOverlay" format="boolean" localization="suggested" />
- <attr name="mrl_rippleAlpha" format="float" localization="suggested" />
- <attr name="mrl_rippleDuration" format="integer" localization="suggested" />
- <attr name="mrl_rippleFadeDuration" format="integer" localization="suggested" />
- <attr name="mrl_rippleHover" format="boolean" localization="suggested" />
- <attr name="mrl_rippleBackground" format="color" localization="suggested" />
- <attr name="mrl_rippleDelayClick" format="boolean" localization="suggested" />
- <attr name="mrl_ripplePersistent" format="boolean" localization="suggested" />
- <attr name="mrl_rippleInAdapter" format="boolean" localization="suggested" />
- <attr name="mrl_rippleRoundedCorners" format="dimension" localization="suggested" />
- # Contoh penempatan di activity_settings
- <com.balysv.materialripple.MaterialRippleLayout xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="fill_parent" android:layout_height="wrap_content" app:mrl_rippleColor="#ff03A9F4" app:mrl_rippleOverlay="true" app:mrl_rippleAlpha="0.2" app:mrl_rippleHover="true" app:mrl_rippleDelayClick="false">
- <Switch android:id="@id/switch_show_location" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/pref_show_location" style="@style/Common.Switch" />
- </com.balysv.materialripple.MaterialRippleLayout>
- # Contoh List Item
- <?xml version="1.0" encoding="utf-8"?>
- <com.balysv.materialripple.MaterialRippleLayout android:layout_width="fill_parent" android:layout_height="70.0dip" app:mrl_rippleColor="#ff585858" app:mrl_rippleOverlay="true" app:mrl_rippleAlpha="0.2" app:mrl_rippleHover="true"
- xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
- <TextView android:textSize="20.0sp" android:ellipsize="end" android:gravity="center_vertical" android:id="@android:id/text1" android:background="@drawable/selector" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
- </com.balysv.materialripple.MaterialRippleLayout>
- ===SOURCE===
- - balysv https://github.com/balysv/material-ripple
Advertisement
Add Comment
Please, Sign In to add comment