java - Is it possible to save checkBox state while switching layout or class? And if its possible how? -


when remember tutorial checkboxes please let me know!

you're getting state using:

boolean selected = checkbox.ischecked(); 

then can add onlayoutchangelistener on view object.
example usage:

view.addonlayoutchangelistener(new onlayoutchangelistener(){    public void onlayoutchange(view v, int left, int top, int right, int bottom, int oldleft, int oldtop, int oldright, int oldbottom){        boolean selected = ((checkbox)v.findviewbyid(r.id.yourcheckboxid)).ischecked();        //savethestatehere    } }); 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -