In my manifest I used to have something like this
<activity android:name=".MyActivity"
android:label="@string/app_name"
name="Theme.NoTitleBar"...
and it worked great, I mean the title bar was not shown.
But now I want to customize the theme (I want to extend 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 shown.
how can I hide the title bar and still have my new custom theme ?
and one more question does adding dots '.' means extending when working with styles ?
in your mainfest you should write something like:
<activity android:name=".MyActivity"
android:label="@string/app_name"
name="MyTheme"...
In your styles.xml 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>
Dot (.) doesn't mean extending. It means referencing a certain element (listview, textview etc.) in your theme. For example, you would have:
<style name="MyTheme.Widget.ListView" parent="@android:style/Widget.ListView.White">
</style>
to define style of your listview.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With