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...
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...