align AlertDialog buttons to center

前端 未结 9 1907
无人共我
无人共我 2020-12-06 09:09

I use this codes for Android (Java) programming:

public static MessageBoxResult showOk(
        Context context, String title, String message, String okMessa         


        
9条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 10:07

    Use crtn's method, but instead of changing the LayoutParam's gravity, change its width to ViewGroup.LayoutParams.MATCH_PARENT;

提交回复
热议问题