[android-developers] Setting theme for an activity
Hi All,
This is my themes.xml file
<
resources>
<style name="Theme.Blue" parent="android:Theme">
<item name="android:windowBackground">@drawable/bodyimg_blue</item>
<item name="android:colorBackground">@color/royalblue</item>
<item name="android:textColor">@color/midnightblue</item>
<item name="android:textViewStyle">@style/TextViewBlue</item>
</style>
<resources>
This is main activity code snippet
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.Theme_Blue);
setContentView(R.layout.
main_screen);
...
The background image is not getting loaded but the text color and textViewStyle got changed.
The background image remains the defalult one -blank screen.
If I am setting the theme in android manifest file then it works properly.
Can anybody tell me the reason for this?
I also found this issue on google code android:
http://code.google.com/p/android/issues/detail?id=3793
This is my themes.xml file
<
resources>
<style name="Theme.Blue" parent="android:Theme">
<item name="android:windowBackground">@drawable/bodyimg_blue</item>
<item name="android:colorBackground">@color/royalblue</item>
<item name="android:textColor">@color/midnightblue</item>
<item name="android:textViewStyle">@style/TextViewBlue</item>
</style>
<resources>
This is main activity code snippet
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.Theme_Blue);
setContentView(R.layout.
main_screen);
...
The background image is not getting loaded but the text color and textViewStyle got changed.
The background image remains the defalult one -blank screen.
If I am setting the theme in android manifest file then it works properly.
Can anybody tell me the reason for this?
I also found this issue on google code android:
http://code.google.com/p/android/issues/detail?id=3793
Warm Regards,
Sudeep
Sudeep
--
Warm Regards,
Sudeep
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home