Hi, I have tried everything thing I can thing of in defining the style of my widget in my theme. But I still can't get it to work. I have posted my questions to various forum/newgroup, I can't get my problem resolved. I appreciate if someone can help me.
I am tying to define the style of MyWidget in my theme. I create a widget myself called 'MyWidget' and I want to define the style of MyWidget in my theme. And I have added this in my manifest file: <application android:label="@string/app_name" android:theme="@style/MyTheme"> This in my themes.xml file: <resources> <style name="MyTheme"> <item name="buttonStyleMyWidget">@style/MyWidget</item> </style> </resources> and this in my styles.xml file: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="MyWidget"> <item name="android:background">@drawable/btn_mywidget_bg</item> </style> </resources> But android did not pick up the style of 'MyWidget' unless I specifically put 'style='@style/MyWidget' In other words, in my main.xml, if i specified my 'style' attribute, my background drawable was displayed correctly. <test.MyWidget android:id="@+id/mywidget" style="@style/MyWidget" /> but if I just do this: <test.MyWidget android:id="@+id/mywidget" /> , the background drawable is not display correctly. Can you please tell me what am I missing? Thank you. --~--~---------~--~----~------------~-------~--~----~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---