android - alert dialog weird behaviour -
i have same problem of weird background apearing below dialog question custom alert dialog looking weird on android 4.x ,i tried solution didn't work
here output of alert dialog after applying solution in link ,
can see title becomes below blue border after importing android.support.v7.app.alertdialog ,here code
import android.app.dialog; import android.support.v7.app.alertdialog; import android.content.context; import android.content.dialoginterface; import android.os.build; import android.os.bundle; public class alert { dialog dialog; public alert(context context){ alertdialog.builder alertdialog; alertdialog = new alertdialog.builder(context, android.r.style.theme_holo_light_dialog); // alertdialogc alertdialog.settitle("title"); charsequence colors[] = new charsequence[] {"test1", "test2", "test3", "test4"}; alertdialog.setitems(colors, new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int which) { // user clicked on colors[which] } }); dialog=alertdialog.create(); } public void show(){ dialog.show(); } }
Comments
Post a Comment