yoyocx

MaterialRippleLayout

May 25th, 2015
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.46 KB | None | 0 0
  1. # Bahan https://goo.gl/D2yHbp
  2. # attrs.xml
  3.  
  4.     <attr name="mrl_rippleColor" format="color" localization="suggested" />
  5.     <attr name="mrl_rippleDimension" format="dimension" localization="suggested" />
  6.     <attr name="mrl_rippleOverlay" format="boolean" localization="suggested" />
  7.     <attr name="mrl_rippleAlpha" format="float" localization="suggested" />
  8.     <attr name="mrl_rippleDuration" format="integer" localization="suggested" />
  9.     <attr name="mrl_rippleFadeDuration" format="integer" localization="suggested" />
  10.     <attr name="mrl_rippleHover" format="boolean" localization="suggested" />
  11.     <attr name="mrl_rippleBackground" format="color" localization="suggested" />
  12.     <attr name="mrl_rippleDelayClick" format="boolean" localization="suggested" />
  13.     <attr name="mrl_ripplePersistent" format="boolean" localization="suggested" />
  14.     <attr name="mrl_rippleInAdapter" format="boolean" localization="suggested" />
  15.     <attr name="mrl_rippleRoundedCorners" format="dimension" localization="suggested" />
  16.  
  17. # Contoh penempatan di activity_settings
  18.  
  19. <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">
  20.         <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" />
  21. </com.balysv.materialripple.MaterialRippleLayout>
  22.  
  23. # Contoh List Item
  24.  
  25. <?xml version="1.0" encoding="utf-8"?>
  26. <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"
  27. xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
  28.     <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" />
  29. </com.balysv.materialripple.MaterialRippleLayout>
  30.  
  31.  
  32. ===SOURCE===
  33. - balysv https://github.com/balysv/material-ripple
Advertisement
Add Comment
Please, Sign In to add comment