我必须将标题文本置于对话框custom.setTitle("Center Text");
?
其中Dialog custom;
谢谢!
答案 0 :(得分:0)
*试试这个*
Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.yourlayout);
TextView titleView = (TextView)dialog.findViewById(android.R.id.title);
if(titleView != null){
titleView.setGravity(Gravity.CENTER);
}