java - Event listener on view in tabs when not extending TabActivity -
i have android app extends mapactivity, can't extend tabactivity. inflating content of tabs dynamically, , looks good.
the problem i'm running in nullpointerexception when trying bind event listeners views inflated tab past first tab.
example:
mybuttonintab2 = (button)this.findviewbyid(r.id.mybuttonintab2); mybuttonintab2.setonclicklistener(new onclicklistener(){ public void(view v){ ///blah blah blah } });
if "inflating content of tabs dynamically", should calling findviewbyid()
on result of inflate()
call, widgets in tab.
Comments
Post a Comment