I created an AlertDialog in my application. Prior to Android L, AlertDialog buttons are placed in the dialog box, but in Android L the button label is automatically converted to the title register, and the buttons are not placed in the dialog box. Please see screenshots:
Android L:

Android Kitkat:

Does anyone see this problem. Can it help me solve this problem, although this is the latest version of Android.
Code : (I did not use the XML code to create the dialog, here is the Java code :)
AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(R.string.feedback_label); alert.setMessage(msgStrId); alert.setNegativeButton(R.string.close_label, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }); alert.setPositiveButton(R.string.rate_app, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }); alert.setNeutralButton(R.string.feedback_label,new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } }); alert.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { // TODO Auto-generated method stub } }); AlertDialog alertDialog = alert.create(); alertDialog.show();
android android-5.0-lollipop android-alertdialog
Devk
source share