Thursday, November 22, 2012

[android-developers] Re: Applying android:actionBarStyle to an activity without using android:theme attribute?

The reason why my trial doesn't work is that <activity> doesn't understand android:actionBarStyle attribute.

 reference: http://developer.android.com/guide/topics/manifest/activity-element.html


On Friday, November 23, 2012 11:29:39 AM UTC+9, jhan wrote:
Hello, 

I'm trying to apply 'android:actionBarStyle' to an activity in AndroidManifest.xml without using 'android:theme' attribute.

By googling, I found lots of references using 'android:theme' attribute like following:

// AndroidManifest.xml
<activity ..
     android:theme="@style/MyTheme" .. >

// style.xml
<style name="MyTheme" parent="...>
   <item name="android:actionBarStyle">@style/MyActionBarStyle</item>
</style>

<style name="MyActionBarStyle" parent="...>
  <item name="android:displayOptions"> .. </item>
</style>


However, if I want to override only actionBarStyle without applying the theme attribute
it doesn't work.

// AndroidManifest.xml
<activity ..
     android:actionBarStyle="@style/MyActionBarStyle" .. >

// style.xml
<style name="MyActionBarStyle" parent="...>
  <item name="android:displayOptions"> .. </item>
</style>


Is there any way to apply "android:actionBarStyle" to an activity without setting a theme?

(I need this to hide  ActionBar when it is launched. But for some reason I can't set a theme to an activity).

--
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


Real Estate