直播平台搭建,更改按钮文字默认大写的设置

直播平台搭建,更改按钮文字默认大写的设置

更改底部按钮默认大写的设置

 

1
<style name="CustomAlertDialog" parent="@style/Theme.AppCompat.Light.Dialog.Alert"><br>        <item name="buttonBarButtonStyle">@style/CustomAlertDialogButton</item><br></style><br><style name="CustomAlertDialogButton" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog"><br>        <item name="textAllCaps">false</item> <!--关闭默认大写的设置 --><br></style><br>//最后通过构造函数将样式传进去<br>AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.CustomAlertDialog);<br> 

底部按钮为三个时,三个按钮居中

//默认情况下:

 

1
        AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomAlertDialog);<br>        AlertDialog dialog = builder.setTitle("My Title")<br>                .setMessage("My Message")<br>                .setPositiveButton("Positive", new DialogInterface.OnClickListener() {<br>                    @Override<br>                    public void onClick(DialogInterface dialog, int which) {<br>                        showToast("Positive");<br>                    }<br>                }).setNeutralButton("Neutral", new DialogInterface.OnClickListener() {<br>                    @Override<br>                    public void onClick(DialogInterface dialog, int which) {<br>                        showToast("Neutral");<br>                    }<br>                }).setNegativeButton("Negative", new DialogInterface.OnClickListener() {<br>                    @Override<br>                    public void onClick(DialogInterface dialog, int which) {<br>                        showToast("Negative");<br>                    }<br>                }).create();<br>        dialog.show();

 

 以上就是 直播平台搭建,更改按钮文字默认大写的设置,更多内容欢迎关注之后的文章

 

posted @   云豹科技-苏凌霄  阅读(21)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示