Created
November 22, 2015 02:41
-
-
Save ronshapiro/c6b10b3c506f444d7ddf to your computer and use it in GitHub Desktop.
Sometimes I wish you could define inline resource values in Android XML that are scoped within their XML subtree.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
android:variable:dimen:textSize="18sp"> | |
<TextView | |
android:variable:dimen:paddingStartEnd="16dp" | |
android:variable:dimen:paddingTopBottom="16dp" | |
android:paddingStart="@local/paddingStartEnd" | |
android:paddingEnd="@local/paddingStartEnd" | |
android:paddingTop="@local/paddingTopBottom" | |
android:paddingBottom="@local/paddingTopBottom" | |
andorid:text="Local Variables" | |
android:textSize="@local/textSize" /> | |
<TextView | |
andorid:text="Would make clean code and make simple styles not necessary" | |
android:textSize="@local/textSize" /> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment