@Test public void testRemoveSpace() { ButtonFooterMixin mixin = new ButtonFooterMixin(mTemplateLayout); final Button fooButton = mixin.addButton("foo", R.style.SuwGlifButton_Secondary); final View space = mixin.addSpace(); fooButton.setTag("foo"); space.setTag("space"); assertNotNull("Foo button should exist", mStubParent.findViewWithTag("foo")); assertNotNull("space should exist", mStubParent.findViewWithTag("space")); mixin.removeSpace(space); assertNotNull("Foo button should not be removed", mStubParent.findViewWithTag("foo")); assertNull("Space should be removed", mStubParent.findViewWithTag("space")); }
public void removeSpace(View space) { if (mButtonContainer != null) { mButtonContainer.removeView(space); } }
ButtonFooterMixin implements Mixin { public void removeSpace(View space) { if (mButtonContainer != null) { mButtonContainer.removeView(space); } } }
ButtonFooterMixin implements Mixin { public void removeSpace(View space) { if (mButtonContainer != null) { mButtonContainer.removeView(space); } } ButtonFooterMixin(TemplateLayout layout); }
ButtonFooterMixin implements Mixin { public void removeSpace(View space) { if (mButtonContainer != null) { mButtonContainer.removeView(space); } } ButtonFooterMixin(TemplateLayout layout); Button addButton(CharSequence text, @StyleRes int theme); Button addButton(@StringRes int text, @StyleRes int theme); Button addButton(Button button); View addSpace(); void removeButton(Button button); void removeSpace(View space); void removeAllViews(); }
ButtonFooterMixin implements Mixin { public void removeSpace(View space) { if (mButtonContainer != null) { mButtonContainer.removeView(space); } } ButtonFooterMixin(TemplateLayout layout); Button addButton(CharSequence text, @StyleRes int theme); Button addButton(@StringRes int text, @StyleRes int theme); Button addButton(Button button); View addSpace(); void removeButton(Button button); void removeSpace(View space); void removeAllViews();  }