Meh*_*ara 3 android dialog android-alertdialog material-design
我正在尝试将对话框标题重力设置为右侧,因为我正在显示阿拉伯文本。请检查附件图片。
所以,我想向右显示标题文本。请建议我的方式。提前致谢。
从我所看到的,您正在使用阿拉伯语,即RTL您可以将整个内容自定义AlertDialog为从右到左,如果您想将代码扭曲为RTL.
好的,这样做:
AlertDialog alertDialog = builder.create();
//We first check if it is above or equal Jelly Bean and setLayoutDirection
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
    alertDialog.getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
}
| 归档时间: | 
 | 
| 查看次数: | 1095 次 | 
| 最近记录: |