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

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -