@Test public void testSetShown() { ProgressBarMixin mixin = new ProgressBarMixin(mTemplateLayout); mixin.setShown(true); ProgressBar progressBar = (ProgressBar) mTemplateLayout.findViewById( R.id.suw_layout_progress); assertNotNull("Progress bar should be available after setting to shown", progressBar); assertEquals(View.VISIBLE, progressBar.getVisibility()); }
public void setShown(boolean shown) { if (shown) { View progressBar = getProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } else { View progressBar = peekProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.GONE); } } }
ProgressBarMixin implements Mixin { public void setShown(boolean shown) { if (shown) { View progressBar = getProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } else { View progressBar = peekProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.GONE); } } } }
ProgressBarMixin implements Mixin { public void setShown(boolean shown) { if (shown) { View progressBar = getProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } else { View progressBar = peekProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.GONE); } } } ProgressBarMixin(TemplateLayout layout); }
ProgressBarMixin implements Mixin { public void setShown(boolean shown) { if (shown) { View progressBar = getProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } else { View progressBar = peekProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.GONE); } } } ProgressBarMixin(TemplateLayout layout); boolean isShown(); void setShown(boolean shown); ProgressBar peekProgressBar(); void setColor(@Nullable ColorStateList color); @Nullable ColorStateList getColor(); }
ProgressBarMixin implements Mixin { public void setShown(boolean shown) { if (shown) { View progressBar = getProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.VISIBLE); } } else { View progressBar = peekProgressBar(); if (progressBar != null) { progressBar.setVisibility(View.GONE); } } } ProgressBarMixin(TemplateLayout layout); boolean isShown(); void setShown(boolean shown); ProgressBar peekProgressBar(); void setColor(@Nullable ColorStateList color); @Nullable ColorStateList getColor();  }