问题描述
我正在开发一款使用Android操作系统的应用程序,使用透明的活动..我用下面的link作为参考,但我的问题是,当我设置背景色为黑色的我不能够见previous。我需要透明是这样的。
I am developing one android application which use transparent activity.. I used the following link as reference but my problem is when i set background color as black i am not able see previous. i need transparent like this .
在此先感谢...
推荐答案
我不得不要求做同样的事情在我的应用程序,我想上面的解决方案,但遗憾的是它没有为我工作。
I had requirements to do the same thing in My Application, and I tried the above solution but unfortunately it didn't work for me.
搜索了很多为同样的问题后,我发现一个,我想在这里分享另一种解决方案,
After searching a lot for the same Issue, I have found one another solution That I would like to share here,
我对上面的一个 Demo.java
活动和 Test.java
活动在background..So展示为此,我已创建了一个风格并应用到Demo.java ...和Magic..All的工作。!!
I have one Demo.java
activity for top and Test.java
Activity to show in background..So for that I have created one Style and applied to Demo.java ...and Magic..All Worked.!!
style.xml
style.xml
<style name="Theme.D1NoTitleDim" parent="android:style/Theme.Translucent">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:background">@android:color/transparent</item>
</style>
和中的Manifest.xml
and in Manifest.xml
<activity android:name="Demo"
android:theme="@style/Theme.D1NoTitleDim"></activity>
希望这将帮助他人。享受编码。!!
Hope This will help Others Too.Enjoy Coding.!!
这篇关于在Android的透明布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!