代码很简单,所有奥秘都在AndroidManifest.xml里面。

加上这句话即可:android:theme="@android:style/Theme.Dialog"。

相关的文档参考,从下面得到:

Dev Guide -> Framework Topic ->Applying Styles and Themes.

To set this theme for all the activites of your application, open the AndroidManifest.xml file and edit the <application> tag to include the android:theme attribute with the theme name:

另外,也可以用代码实现。

在onCreate中,

setTheme(android.R.style.***);

可以试试,有多种效果可以选择哦。

如 Translucent 就是半透明效果

更多相关文章

  1. Android 修改默认的ProgressBar的动画效果
  2. Android近百个项目的源代码
  3. Android代码速查,写给新手的朋友们
  4. Java代码设置Android全屏
  5. [置顶] Android 代码混淆 选项说明
  6. android秒表计时代码
  7. android代码片段一
  8. Activity页面切换的效果
  9. 用SlidingDrawer实现类似android状态栏下拉上拉效果!

随机推荐

  1. react native友盟app统计
  2. 【Android性能工具】腾讯开源工具APT
  3. android.app.Activity 的介绍(转)
  4. Android客户端与服务器之间传递json数据
  5. 【移动开发】Android相机、相册获取图片
  6. [笔记]如何解决Your project contains C+
  7. Android动画之三:Property Animation(上)
  8. Android进阶(二)https请求No peer certif
  9. Android实现音乐播放 Music 详解
  10. Android(安卓)判断、创建和删除快捷方式