Extension styles and confusion

In my manifest, I had something like this

<activity android:name=".MyActivity" android:label="@string/app_name" name="Theme.NoTitleBar"... 

and it worked perfectly, I mean, the title bar was not shown.

But now I want to customize the theme (I want to expand the default Android theme) and I created this theme

 <style name="Theme.NoTitleBar.new_skin" parent="android:Theme"> <item name="text_body_read">@style/text_body_read</item> <item name="text_body_unread">@style/text_body_unread</item> </style> 

then in the manifest I set name="Theme.NoTitleBar.new_skin" , but the title bar is still displayed.

How can I hide the title bar and still have my new custom theme?

and another question adds points. does extension mean while working with styles?

+4
source share
1 answer

in your mainfest you should write something like:

 <activity android:name=".MyActivity" android:label="@string/app_name" name="MyTheme"... 

In your styles.xml file you should write something like:

 <style name="MyTheme" parent="android:Theme.NoTitleBar"> <item name="text_body_read">@style/text_body_read</item> <item name="text_body_unread">@style/text_body_unread</item> </style> 

A period (.) Does not mean expansion. This means a link to a specific element (listview, textview, etc.) in your topic. For example, you will have:

 <style name="MyTheme.Widget.ListView" parent="@android:style/Widget.ListView.White"> </style> 

to determine the style of your list.

+1
source

All Articles