Skip to content

Instantly share code, notes, and snippets.

@hoajb
Last active August 24, 2019 16:51
Show Gist options
  • Save hoajb/538fb73fbfef9959c79d62fc9192f9e4 to your computer and use it in GitHub Desktop.
Save hoajb/538fb73fbfef9959c79d62fc9192f9e4 to your computer and use it in GitHub Desktop.
Apply Material Design Touch Ripple to ImageButton?
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/ic_button"
android:background="?attr/selectableItemBackgroundBorderless"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_dialog"
android:background="?android:attr/selectableItemBackground" />
DataBinding XML
android:text= "@{String.format(@string/Generic_Text, Profile.name)}"
android:text="@{@string/location(user.city,user.state)}"
<string name="location">%1$s, %2$s</string>
android:text="@{`Hello ` + user.name}"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment