Skip to content

Instantly share code, notes, and snippets.

@emedinaa
Last active December 1, 2017 13:10
Show Gist options
  • Save emedinaa/afae862cdfa969d852f23d88268b03fc to your computer and use it in GitHub Desktop.
Save emedinaa/afae862cdfa969d852f23d88268b03fc to your computer and use it in GitHub Desktop.
Android -Html
Phone :
<a href="tel:2125551212">2125551212</a>
Hexadecimal color :
0% = #00
10% = #16
20% = #32
30% = #48
40% = #64
50% = #80
60% = #96
70% = #112
80% = #128
90% = #144
TabLayout
https://stackoverflow.com/questions/30909471/tablayout-android-design-library-text-color
Drawable
https://stackoverflow.com/questions/16369814/how-to-access-the-drawable-resources-by-name-in-android
https://developer.android.com/reference/android/support/design/widget/TabLayout.html
//TextView - html
<string name="your_string"><![CDATA[ contact us at <a href=\"mailto:recipient@mail.com\">recipient@mail.com</a> for more help.]]></string>
tvObject.setText(Html.fromHtml(getString(R.string.your_string)));
tvObject.setMovementMethod(LinkMovementMethod.getInstance());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment