Last active
July 30, 2016 03:50
-
-
Save uchidev/36e505328300dc516bf481310f8a9389 to your computer and use it in GitHub Desktop.
AppCompatTextView
This file contains hidden or 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
| AppCompatTextView textView = view.findViewByIdR.id.text); | |
| textView.setTextAppearance(textView.getContext(), R.style.ItemText); | |
| textView.setBackgroundResource(R.drawable.item_bg); | |
| textView.setText("Hello"); |
This file contains hidden or 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
| TextView textView = view.findViewByIdR.id.text); | |
| TextViewCompat.setTextAppearance(textView, R.style.ItemText); | |
| textView.setBackgroundResource(R.drawable.item_bg); | |
| textView.setText("Hello"); |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item android:state_pressed="false"> | |
| <shape android:shape="rectangle"> | |
| <solid android:color="@color/PicListChooseFolderBG" /> | |
| </shape> | |
| </item> | |
| <item android:state_pressed="true"> | |
| <shape android:shape="rectangle"> | |
| <solid android:color="#ff888888" /> | |
| </shape> | |
| </item> | |
| </selector> |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item android:state_checked="true" android:state_pressed="false" | |
| android:color="#ffffffff" /> | |
| <item android:state_checked="true" android:state_pressed="true" | |
| android:color="#ffffffff" /> | |
| <item android:state_checked="false" android:state_pressed="false" | |
| android:color="#88888888" /> | |
| <item android:state_checked="false" android:state_pressed="true" | |
| android:color="#88ffffff" /> | |
| </selector> |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- values/styles.xml --> | |
| <resources> | |
| <style name="ItemText" parent="@style/TextAppearance.AppCompat.Medium"> | |
| <item name="android:textColor">@drawable/item_text</item> | |
| </style> | |
| </resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment