I made a viewstub
that is inflated and created again many times. The layout it uses includes a "delete" button that hides the viewstub (or deflates it).
When I'm creating a new viewstub
I call this code:
ViewStub eventStub = new ViewStub(this);
eventStub.setLayoutResource(R.layout.event_container);
eventContainerMain.addView(eventStub);
eventStub.inflate();
Problem is, in the viewstub
layout the delete button is created with the new viewstub
. So how do I make the delete button hide the viewstub
thats inside?
Most importantly, How do I make other methods affect only the view its inside?