Share Coding

Tutorials, Problems, Stuffs …

Android How to disable action bar shadow?

Google Material design showing demonstration that an ActionBar always have no shadow.

未命名

To do this, set android:windowContentOverlay to @null at your style.

In res/style.xml

<style name="MyOrange" parent="@android:style/Theme.Holo.Light">
     <item name="android:windowContentOverlay">@null</item>
</style>

In AndroidManifest.xml

<activity
    android:name=".main.EntryPointActivity"
    android:screenOrientation="landscape"
    android:theme="@style/MyOrange.NoActionBar">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: