AlertDialog.Builder builder = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_TRADITIONAL);//传统主题
 

AlertDialog.Builder builder = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_HOLO_DARK);//使用深色背景 主题
 
 
 
AlertDialog.Builder builder = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_HOLO_LIGHT);//使用浅色背景 主题
 
 
AlertDialog.Builder builder = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_DEVICE_DEFAULT_DARK);//使用默认设备 深色主题
 
 
AlertDialog.Builder builder = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);//使用默认设备 浅色主题
 

//自定义布局

View layout = getActivity().getLayoutInflater().inflate(R.layout.mydialog,null);

AlertDialog.Builder dialog = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_DEVICE_DEFAULT_DARK);

final AlertDialog dialog = builder.create();
dialog.setView(layout);
//透明
Window window = dialog.getWindow(); 
WindowManager.LayoutParams lp = window.getAttributes();
lp.alpha = 0.9f;
window.setAttributes(lp);
。。。
dialog.show();
 

Android Dialog 系统样式讲解及透明背景的更多相关文章

  1. Dialog_ _dialog系统样式讲解 及 透明背景

    AlertDialog.Builder builder = new AlertDialog.Builder(DialogActivity.this,AlertDialog.THEME_TRADITIO ...

  2. 我的Android进阶之旅------>Android中Dialog系统样式讲解

    今天在维护公司的一个APP的时候,有如下场景. 弹出一个AlertDialog的时候,在系统语言是中文的时候,如下所示: 弹出一个AlertDialog的时候,在系统语言是English的时候,如下所 ...

  3. android学习笔记50——SQLiteOpenHelper、android实现系统自带样式

    SQLiteOpenHelper SQLiteOpenHelper是android提供的一个管理数据库的工具类,可用于管理数据库的创建和版本更新. 一般的用法是创建SQLiteOpenHelper的子 ...

  4. Android自带样式

    Android系统自带样式: android:theme="@android:style/Theme.Dialog" 将一个Activity显示为对话框模式 android:the ...

  5. android 中theme样式的解释

    android:theme="@android:style/Theme.Dialog" : Activity显示为对话框模式 android:theme="@androi ...

  6. android 修改系统的dialog样式

    android 修改系统的dialog样式 一.觉得自定义配置文件麻烦?那就来修改系统自定义XML文件来实现修改系统dialog的样式吧. 如果是在XML中样式:首先来说下样式.  在 Style.x ...

  7. Android用户界面 UI组件--TextView及其子类(三) EditView以及各种Span文字样式讲解

    EditView和TextView的用法差不多,只是文字可编辑 小技巧: 设置EditText隐藏键盘  setInputType(0); 设置EditText不被输入法遮盖  getWindow() ...

  8. 这些Android系统样式中的颜色属性你知道吗?

    Android 系统样式中的颜色属性 推荐阅读看完后彻底搞清楚Android中的 Attr . Style .Theme 几个常用的颜色属性 先放上一张经典的图片,图片来自网络. 这张图在网上很是流传 ...

  9. Android学习系列(40)--Android主题和样式之系统篇(下)

    11)Widget样式(Widget Style) 特别说明,此处定义大量的系统内置控件的样式,对于重写原生控件的样式具有很大的参考价值. <!-- Widget styles --> & ...

随机推荐

  1. IIS支持APK/ISO文件下载的方法

    默认把安卓手机应用或游戏的apk格式文件上传到服务器空间是不能直接下载的,这是因为IIS的默认MIME类型中没有.apk文件,所以无法下载.@VCOO 既然.apk无法下载是因为没有MIME,那么添加 ...

  2. windowIsTranlucent 属性

    项目中踩的大坑.  先埋. int alwaysFinish = 0; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERS ...

  3. 说说RMAN里的obsolete

    RMAN> report obsolete; RMAN retention policy will be applied to the commandRMAN retention policy ...

  4. Solution(项目部署):The server does not support version 3.0 of the J2EE Web module specification

    1.错误: 在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of t ...

  5. 你好,C++(36)人参再好,也不能当饭吃!6.3 类是如何面向对象的

    6.3  类是如何面向对象的 类作为C++与面向对象思想结合的产物,作为面向对象思想在C++中的载体,它的身上流淌着面向对象的血液.从类成员的构成到类之间的继承关系再到虚函数,到处都体现着面向对象封装 ...

  6. openMPI小集群安装

    经过一天的努力,终于完成了openMPI的多节点安装,即小集群安装.本文使用的是openmpi-1.6.5,下载地址见:http://www.open-mpi.org/software/ompi/v1 ...

  7. css命名为何不推荐使用下划线_

    一直习惯了在命名CSS样式名时使用下划线“_”做为单词的分隔符,这也是在写JS时惯用的写法. 用过CSS hack的朋友应该知道,用下划线命名也是一种hack,如使用“_style”这样的命名,可以让 ...

  8. IOC-控制反转(Inversion of Control),也成依赖倒置(Dependency Inversion Principle)

    基本简介 IoC 亦称为 “依赖倒置原理”("Dependency Inversion Principle").差不多所有框架都使用了“倒置注入(Fowler 2004)技巧,这可 ...

  9. linux常用svn命令(转载)

     原地址:http://www.rjgc.net/control/content/content.php?nid=4418       1.将文件checkout到本地目录svn checkout p ...

  10. 用python+selenium获取XX省交通违章数据

    前言: 目前在研究易信公众号,想给公众号增加一个获取个人交通违章的查询菜单,通过点击返回查询数据.以下是实施过程. 一.首先,用火狐浏览器打开XX省交管网,分析页面信息: 可以看到共有4种查询种类,我 ...