相关疑难解决方法(0)

右对齐AlertDialog中的文本

是否可以在AlertDialog的标题和消息中对文本进行右对齐?

我正在展示希伯来语的消息,但它们显示左对齐.

android justify android-alertdialog

15
推荐指数
3
解决办法
1万
查看次数

android中的对话框示例

我想在按钮上单击显示一个对话框.这是我的代码,但它不起作用.

AlertDialog.Builder builder = new AlertDialog.Builder(
                        getApplicationContext());
                builder.setCancelable(true);
                builder.setTitle("Title");
                builder.setInverseBackgroundForced(true);
                builder.setPositiveButton("Yes",
                        new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog,
                                    int which) {
                                dialog.dismiss();
                            }
                        });
                builder.setNegativeButton("No",
                        new DialogInterface.OnClickListener() {
                            @Override
                            public void onClick(DialogInterface dialog,
                                    int which) {
                                dialog.dismiss();
                            }
                        });
                AlertDialog alert = builder.create();
                alert.show();
Run Code Online (Sandbox Code Playgroud)

android android-alertdialog

3
推荐指数
1
解决办法
5万
查看次数

标签 统计

android ×2

android-alertdialog ×2

justify ×1