Answer the question
In order to leave comments, you need to log in
Android styles and themes?
I decided to try working with styles and themes and immediately began.
created style (task, make all text green)
<style name="PrivatStyle" parent="android:style/Theme.DeviceDefault">
<item name="android:textColor">#00FF00</item>
</style>
android:theme="@style/PrivatStyle"
Answer the question
In order to leave comments, you need to log in
The fact is that Button, EditText is a completely different element, which has its own styles. You overridden only the color of the TextView, it seems.
For buttons, you need to redefine android:buttonStyle
For checkboxes, android:checkboxStyle
etc ...
Try it
<style name="CustomText" parent="@style/Text">
<item name="android:textSize">20sp</item>
<item name="android:textColor">#008</item>
</style>
like that
So far this is an option.
Everything works except ExpandableListView.
Somehow through ... strange, all this is done.
Here's how you can understand why everything applies everywhere, namely to the ExpandableListView reaction 0, although the same TextView lies on the layout.
<style name="PrivatStyle" parent="Theme.Sherlock">
<item name="android:textColor">@color/default_text_color</item>
<item name="android:textAppearance">@style/MyTextAppearance</item>
<item name="android:buttonStyle">@style/MyButtonStyle</item>
<item name="android:editTextStyle">@style/MyEditTextStyle</item>
<item name="android:imageButtonStyle">@style/MyImageButtonStyle</item>
<item name="android:textViewStyle">@style/MyTextViewStyle</item>
<item name="android:expandableListViewStyle">@style/MyExpandableListViewStyle</item>
<item name="android:listViewStyle">@style/MyListViewStyle</item>
</style>
<style name="MyTextAppearance" parent="@android:style/TextAppearance">
<item name="android:textColor">@color/default_text_color</item>
</style>
<style name="MyButtonStyle" parent="@android:style/Widget.Button">
<item name="android:textColor">@color/default_text_color</item>
</style>
<style name="MyEditTextStyle" parent="@android:style/Widget.EditText">
<item name="android:textColor">@color/default_text_color</item>
</style>
<style name="MyExpandableListViewStyle" parent="@android:style/Widget.ExpandableListView">
<item name="android:textColor">@color/default_text_color</item>
</style>
<style name="MyListViewStyle" parent="@android:style/Widget.ListView">
<item name="android:textColor">@color/default_text_color</item>
</style>
<style name="MyImageButtonStyle" parent="@android:style/Widget.ImageButton">
<item name="android:textColor">@color/default_text_color</item>
</style>
<style name="MyTextViewStyle" parent="@android:style/Widget.TextView">
<item name="android:textColor">@color/default_text_color</item>
</style>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question