I use this codes for Android (Java) programming:
public static MessageBoxResult showOk( Context context, String title, String message, String okMessa
Use crtn's method, but instead of changing the LayoutParam's gravity, change its width to ViewGroup.LayoutParams.MATCH_PARENT;
LayoutParam's
ViewGroup.LayoutParams.MATCH_PARENT;