Menu
  • HOME
  • TAGS

How to refer to each EditText individually?

android,xml,layout-inflater,viewstub

I agree that it's not recommended to have the same ID on more than one view, however sometimes it's unavoidable. In that case, as long as the two views are not direct children of the same viewgroup, you can use findViewById on their respected viewgroup. For example when you inflate...

Check if my ViewStub is inflated/visible and is null/non null?

android,viewstub

So what I ended up doing was to setOnInflateListener (ViewStub.OnInflateListener inflateListener) ViewStub stub1 = ((ViewStub)findViewById(KR.get(R.abc_stub))); stub1.setOnInflateListener(new ViewStub.OnInflateListener{ @Override public void onInflate(ViewStub paramViewStub, View paramView) { // Set a class boolean if it was inflated } }); If the boolean is true stub1 is the screen that is up. Else its...