如何创建Android中一个半透明的指令页?指令、Android

2023-09-04 07:56:29 作者:︶ㄣ殺愛戒愛

我是新来的Andr​​oid和努力工作,在这个问题上的最后2天,但能找到一个解决方案。任何帮助将是非常美联社preciated。如何为使用一个App卡路里计数器在Android Market中创造的指令一个半透明的网页?

I am new to Android and trying to work on this problem for last 2 days but could find a solution. Any help will be highly appreciated. How to create a semi-transparent page for instruction as used by an App Calorie Counter in Android Market?

推荐答案

创建一个新的活动,并设置顶层视图有一个半透明的背景:

Create a new activity and set the top-level view to have a translucent background:

android:background="#c0000000"

编辑:您还需要申报的活动有一个透明的背景。设置这个主题在清单将工作活动:

You also need to declare the activity to have a transparent background. Setting this theme for the activity in the manifest will work:

android:theme="@android:style/Theme.Translucent"