android - Blank white space around Timepicker dialog -
i trying create time picker application.. , when setting theme theme_devicedefault_light_dialog_noactionbar_minwidth
i getting output
i getting blank space around dialog box
this not happening when setting use parent activity's theme appcompat.noactionbar
//not happening here return new timepickerdialog(getactivity(),this, hour, minute,is24hourview );
here timepicker code
public class timepickerfragment extends dialogfragment implements timepickerdialog.ontimesetlistener{ @override public dialog oncreatedialog(bundle savedinstancestate){ //use current time default values time picker final calendar c = calendar.getinstance(); int hour = c.get(calendar.hour_of_day); int minute = c.get(calendar.minute); boolean is24hourview=true; simpledateformat sdf = new simpledateformat("hh:mm"); string formattedtime = sdf.format(c.gettime()); log.d("time", formattedtime); //create , return new instance of timepickerdialog // return new timepickerdialog(getactivity(),this, hour, minute,is24hourview ); return new timepickerdialog(getactivity(), android.r.style.theme_devicedefault_light_dialog_noactionbar_minwidth,this, hour, minute,is24hourview ); }
change:
android.r.style.theme_devicedefault_light_dialog_noactionbar_minwidth
with
alertdialog.theme_device_default_light
or
alertdialog.theme_holo_light
it should work
Comments
Post a Comment