Android设置Activity背景为透明style
来源:互联网 发布:进程4占用80端口 编辑:程序博客网 时间:2024/05/02 16:49
Android设置Activity背景为透明style(解决实现不弹出处理微信支付结果的Activity):
方法一:
通过Theme.Translucent
@android:style/Theme.Translucent @android:style/Theme.Translucent.NoTitleBar @android:style/Theme.Translucent.NoTitleBar.Fullscreen
只需要在Manifest中需要透明的Activity内设置theme为以上任意一个就可以了
<activity android:name="com.vixtel.simulate.MainApp" android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent.NoTitleBar" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
方法二:
自定义style,就像自定义Dialog的style一样,在res-values-color.xml中添加透明颜色值:
<?xml version="1.0" encoding="UTF-8"?><resources> <color name="transparent">#0000</color></resources>
在res-values-styles.xml中添加如下:
<style name="myTransparent"> <item name="android:windowBackground">@color/transparent</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item> </style>
在Manifest中中需要透明的Activity内设置theme为我们自定义的即可
android:theme="@style/myTransparent"
原文:http://blog.csdn.net/mad1989/article/details/38122713
0 0
- Android设置Activity背景为透明style
- Android设置Activity背景为透明style
- Android设置Activity背景为透明style
- Android设置Activity背景为透明style
- Android设置Activity背景为透明style发生的错误
- Android做一个透明的Activity,设置Activity背景为透明style
- android 设置activity为对话框,且背景为透明
- android设置Activity背景透明
- android activity 背景 透明 设置方法
- Android设置窗体Activity背景透明
- Android开发之Activity设置透明背景
- Android 代码设置Activity 背景透明
- android activity设置透明或者半透明背景
- Activity设置透明背景
- Activity设置透明背景
- 透明背景Activity设置
- Android webview背景设置为透明无效
- Android webview背景设置为透明无效
- QT、QTE、qtopia区别
- dispatch_barrier_async
- What is CountDownLatch in Java
- ADB push 错误
- Nginx优化指南+LINUX内核优化+linux连接数优化+nginx连接数优化
- Android设置Activity背景为透明style
- Spring框架下的单元测试方法
- Java并发包中的同步队列SynchronousQueue实现原理
- Android 进程与线程基础知识 及 如何停止进程
- 有一个整数数组,请你根据快速排序的思路,找出数组中第K大的数。 给定一个整数数组a,同时给定它的大小n和要找的K(K在1到n之间),请返回第K大的数,保证答案存在。
- 轻松把玩HttpAsyncClient之模拟post请求示例
- 个人图片地址测试
- 计算时间的差值
- Haproxy+keepalived实现高可用负载均衡