Hi, All!
I want to change the look of my Android app's preference screen to white background and dark text color...
I try:
Variant 1:
In my Activity i set
Variant 2:
Here is my AndroidManifest.xml:
Variant 3:
i create my custom theme:
here is my SettingsActivity.java:
Here is my AndroidManifest.xml:
Here is my style.xml:
In all these variants I get white background but text color is too white ((
How can i change text color to black?
I want to change the look of my Android app's preference screen to white background and dark text color...
I try:
Variant 1:
In my Activity i set
Code:
class SettingsActivity extends PreferenceActivity
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(android.R.style.Theme_Light);
addPreferencesFromResource(R.layout.settings);
........
Variant 2:
Here is my AndroidManifest.xml:
Code:
<activity android:name=".view.SettingsActivity"
android:theme="@android:style/Theme.Light"></activity>
Variant 3:
i create my custom theme:
here is my SettingsActivity.java:
Code:
public class SettingsActivity extends PreferenceActivity implements OnSharedPreferenceChangeListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.layout.settings);
.....
Here is my AndroidManifest.xml:
Code:
<activity android:name=".view.SettingsActivity"
android:theme="@android:style/MyTheme"></activity>
Here is my style.xml:
Code:
<style name="MyTheme" >
<item name="@android:textAppearance">@style/MyDefaultTextAppearance</item>
</style>
<style name="MyDefaultTextAppearance" parent="@android:style/TextAppearance">
<item name="android:textSize">12sp</item>
<item name="android:textColor">#000000</item>
<item name="android:textStyle">bold</item>
</style>
In all these variants I get white background but text color is too white ((
How can i change text color to black?
