android - Adding View doesn't Appear -


i trying add checkboxs view have on layout. problem is not showing, know being added because of getchildcount() @ parent view returns new more item..

i doing inside handler, because method called inside thread.

protected void adddevicetolist(final string name, final connectsend cs) {          mhandler.post(new runnable() {             @override             public void run() {                 toast.maketext(connectsend.this, "a: " + listofpersons.getchildcount()+ " vou adicionar um!", toast.length_long).show();                  checkbox checkbox = new checkbox(cs);                 linearlayout.layoutparams fieldparams = new linearlayout.layoutparams(linearlayout.layoutparams.wrap_content, linearlayout.layoutparams.wrap_content, 1.0f);                 checkbox.settextappearance(cs, android.r.attr.textappearancemedium);                 checkbox.settext(name);                 checkbox.setlayoutparams(fieldparams);                 listofpersons.addview(checkbox);                  toast.maketext(connectsend.this, "d: " + listofpersons.getchildcount()+ " adicionei ", toast.length_long).show();             }         });      } 

thanks alot in advance ;)

try using checkbox.setvisibility(view.visible)


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -