android依赖alert样式,Android - AlertDialog样式
我在应用程序中有一个警告对话框,如下所示。
我想要标题和分隔标题的行 - 消息正文为橙色。我怎样才能做到这一点?
我试过的是使用自定义样式,如下所示。但是这不起作用。
#E5492A
我的警报对话框代码:
AlertDialog.Builder alertDialog = new AlertDialog.Builder( new ContextThemeWrapper(MainActivity.context, R.style.AboutDialog));
alertDialog.setTitle("Sample");
alertDialog.setMessage(R.string.rate_dialog_text);
alertDialog.setPositiveButton(R.string.rate_now_text,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
MainActivity.context.startActivity(new Intent(
Intent.ACTION_VIEW, Uri
.parse("market://details?id="
+ MainActivity.APP_PNAME)));
if (editor != null) {
editor.putBoolean("dontshowagain", true);
editor.commit();
}
dialog.dismiss();
}
});
alertDialog.setNeutralButton(R.string.remind_later_text,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alertDialog.setNegativeButton(R.string.no_thanks_text,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (editor != null) {
editor.putBoolean("dontshowagain", true);
editor.commit();
}
dialog.dismiss();
}
});
return alertDialog.create();
}
android依赖alert样式,Android - AlertDialog样式相关推荐
- android sqlite alert table,android sqlite数据库操作
sqlite有一点不同于其他常见数据库,就是sqlite数据库是存成文件的,可以直接把该文件从手机里导出来,以文件的形式存在,然后放到电脑上查看. Android操作数据库有如下步骤: 1.继承SQL ...
- 024 Android 自定义样式对话框(AlertDialog)
1.AlertDialog介绍 AlertDialog并不需要到布局文件中创建,而是在代码中通过构造器(AlertDialog.Builder)来构造标题.图标和按钮等内容的. 常规使用步骤(具体参见 ...
- android alertdialog 样式,设置AlertDialog的列表样式
虽然谷歌的sdk已经给大家提供了诸多的接口去实现大家想要的界面,但是时常我们还是因为客户的需求,来对界面进行相应的修改,以更加适合业务的需要. 在进行android界面设计的时候,我在使用AlertD ...
- Android移动开发之【Android实战项目】漂亮Button样式
开发中各种样式的Button,其实这些样式所有的View都可以共用的,可能对于你改变的只有颜色 所有的都是用代码实现 文章目录 边框样式,给你的View加上边框 圆角Button 带点击状态的Butt ...
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
作者 : 万境绝尘 (octopus_truth@163.com) 转载请著名出处 : http://blog.csdn.net/shulianghan/article/details/3926916 ...
- android 对话框白色样式,Android 对话框(Dialog)样式大全以及简单实现
下面是几种对话框的效果 图一: 图二: 图三: 图四: 图五: 图六: 图七: 图1效果:该效果是当按返回按钮时弹出一个提示,来确保无误操作,采用常见的对话框样式. 代码: 创建对话框方法dialog ...
- android自定义漂亮按钮样式,Android开发之漂亮Button样式
开发中各种样式的Button,其实这些样式所有的View都可以共用的,可能对于你改变的只有颜色 所有的都是用代码实现 150CC48D90067F05BFAC966F4EE3E21D.jpg 边框样式 ...
- android 自定义dialog样式,Android 自定义dialog类
首先定制style样式 styles.xml 加入自定义样式 @null true true true @color/transparent @color/transparent true 0.6 在 ...
- Android系统自带主题样式(android:theme),Android Dialog 系统样式
部分转载:http://stephen830.iteye.com/blog/1129203 , http://blog.sina.com.cn/s/blog_3e333c4a0102vk0f.htm ...
- android 自定义menu菜单,android 自定义menu菜单样式
Android系统中的menu样式不是太好,可以自定义.运行效果 CustomActivity.java继承Activity.java 在此文件中实现了不同于系统的dialog import java ...
最新文章
- vue实战(1)——解决element-ui中upload组件使用多个时无法绑定对应的元素
- 集合之四:List接口
- T2821 天使之城 codevs
- 危机下,你还敢提加薪吗?
- java改写模式_Java基于状态模式实现的文档编辑模式切换功能实例
- MSFT Outlook VBA处理新邮件的方法
- Python3 基础学习笔记 C06【用户输入和 while 循环】
- LeetCode 164. 最大间距
- JavaScript 演练(8). 对象成员、类成员(原型、非原型)
- 2021-08-25
- HTTP协议之Content-Encoding - 天下无贼 - 51CTO技术博客
- Cocos2D场景编辑器
- 《开源公开课分享》:Java开源框架案例分享
- MSDE 下载安装、创建管理数据库
- 微型计算机原理指令改错题,微机原理期末考试题
- xbox 360手柄驱动程序_魔派PRO手柄常见问题解决方法一览
- 传智杯第四届初赛 B小卡与质数2
- [高数][高昆轮][高等数学上][第二章-导数与微分]04.隐函数及由参数方程所确定的函数的导数...
- Git ---- 国内代码托管中心-码云
- ActiveMQ —— Spring 整合 ActiveMQ