Last active
May 6, 2018 11:44
-
-
Save li2/c5c73904850ff99db13a to your computer and use it in GitHub Desktop.
实现背景半透明的 Android Activity?How to get appcompat translucent theme with support actionbar?通过修改 theme 的某些属性字段值来实现。 #tags: android-activity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--Refer to: http://stackoverflow.com/questions/20862258/android-how-to-get-appcompat-translucent-type-theme-with-support-actionbar--> | |
<!-- /res/values/styles.xml --> | |
<style name="Theme.AppCompat.Translucent"> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:windowBackground">@android:color/transparent</item> | |
<item name="android:colorBackgroundCacheHint">@null</item> | |
<item name="android:windowIsTranslucent">true</item> | |
<item name="android:windowAnimationStyle">@android:style/Animation</item> | |
</style> | |
<!-- AndroidManifest.xml --> | |
<activity android:name=".TranslucentThemeActivity" | |
android:theme="@style/Theme.AppCompat.Translucent"/> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment