codenameone : Custom calendar button background -
i need create calendar different background colors depending on content of daybuttons, how can make colors fix : unchanged when selecting date using codenameone.
i tried simple modification when selecting button colors turn white configured in theme (i use ui builder)
@override protected void updatebuttondaydate(button daybutton, int year, int currentmonth, int day) { //daybutton.setuiid("container"); daybutton.getallstyles().setpaddingtop(3); daybutton.getallstyles().setpaddingbottom(3); daybutton.getallstyles().setbgcolor(colorutil.blue); }
try setting setchangesselecteddateenabled(false)
make sure button doesn't have border , it's opaque doing this:
style s = daybutton.getallstyles(); s.setpaddingtop(3); s.setpaddingbottom(3); s.setbgcolor(colorutil.blue); s.setbgtransparency(255); s.setborder(null);
Comments
Post a Comment