Android 透明窗体
请教各位Flex建的Android空白项目怎么让窗体背景变成透明的。不胜感激!!! --------------------编程问答-------------------- 设置背景啊,android:background="#00ffffff",前面两个0是设置透明度,后面六个f是设置颜色,每两位对应三原色的一种颜色的值 --------------------编程问答-------------------- 我试过了不管用,app.xml也改过了。 --------------------编程问答-------------------- try
android:theme="@android:style/Theme.Translucent" --------------------编程问答-------------------- id.getBackground().setAlpha(230); --------------------编程问答--------------------
在manifest中添加这句试试 --------------------编程问答-------------------- <!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<android:theme="@android:style/Theme.Translucent">
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
<!-- <colorDepth></colorDepth> -->
</android>
是这样改吗 --------------------编程问答--------------------
这个可以试试! --------------------编程问答--------------------
<activity android:theme="@android:style/Theme.Translucent" />--------------------编程问答--------------------
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<android:theme="@android:style/Theme.Translucent">
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
<!-- <colorDepth></colorDepth> -->
</android>
是这样改吗
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"
android:theme="@android:style/Theme.Translucent"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
放到activity里。 --------------------编程问答-------------------- 谢谢给位的回答 --------------------编程问答-------------------- <android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"
android:theme="@android:style/Theme.Translucent"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
<colorDepth>16bit</colorDepth>
</android>
还是不是透明的 --------------------编程问答--------------------
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<android:theme="@android:style/Theme.Translucent">
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
<!-- <colorDepth></colorDepth> -->
</android>
是这样改吗
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"
android:theme="@android:style/Theme.Translucent"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
放到activity里。
http://blog.csdn.net/se_lc7/article/details/14225539
你看看这个能参考吗,我自己原来写的一个总结。。 --------------------编程问答-------------------- 谢谢你的回答
补充:移动开发 , Android