@Test public void init_setsColorValuesWithAlpha() { final int alpha = 204; int[] colorValues = mMaskedCardView.getTextColorValues(); assertEquals(4, colorValues.length); assertEquals(colorValues[1], ColorUtils.setAlphaComponent(colorValues[0], alpha)); assertEquals(colorValues[3], ColorUtils.setAlphaComponent(colorValues[2], alpha)); }
@VisibleForTesting int[] getTextColorValues() { int[] colorValues = new int[4]; colorValues[0] = mSelectedColorInt; colorValues[1] = mSelectedAlphaColorInt; colorValues[2] = mUnselectedTextColorInt; colorValues[3] = mUnselectedTextAlphaColorInt; return colorValues; }
MaskedCardView extends LinearLayout { @VisibleForTesting int[] getTextColorValues() { int[] colorValues = new int[4]; colorValues[0] = mSelectedColorInt; colorValues[1] = mSelectedAlphaColorInt; colorValues[2] = mUnselectedTextColorInt; colorValues[3] = mUnselectedTextAlphaColorInt; return colorValues; } }
MaskedCardView extends LinearLayout { @VisibleForTesting int[] getTextColorValues() { int[] colorValues = new int[4]; colorValues[0] = mSelectedColorInt; colorValues[1] = mSelectedAlphaColorInt; colorValues[2] = mUnselectedTextColorInt; colorValues[3] = mUnselectedTextAlphaColorInt; return colorValues; } MaskedCardView(Context context);  MaskedCardView(Context context, AttributeSet attrs);  MaskedCardView(Context context, AttributeSet attrs, int defStyle); }
MaskedCardView extends LinearLayout { @VisibleForTesting int[] getTextColorValues() { int[] colorValues = new int[4]; colorValues[0] = mSelectedColorInt; colorValues[1] = mSelectedAlphaColorInt; colorValues[2] = mUnselectedTextColorInt; colorValues[3] = mUnselectedTextAlphaColorInt; return colorValues; } MaskedCardView(Context context);  MaskedCardView(Context context, AttributeSet attrs);  MaskedCardView(Context context, AttributeSet attrs, int defStyle); @Override boolean isSelected(); @Override void setSelected(boolean selected); }
MaskedCardView extends LinearLayout { @VisibleForTesting int[] getTextColorValues() { int[] colorValues = new int[4]; colorValues[0] = mSelectedColorInt; colorValues[1] = mSelectedAlphaColorInt; colorValues[2] = mUnselectedTextColorInt; colorValues[3] = mUnselectedTextAlphaColorInt; return colorValues; } MaskedCardView(Context context);  MaskedCardView(Context context, AttributeSet attrs);  MaskedCardView(Context context, AttributeSet attrs, int defStyle); @Override boolean isSelected(); @Override void setSelected(boolean selected);  }