Skip to content

Commit 8ffff9c

Browse files
ikim24afohrman
authored andcommitted
Automated g4 rollback of changelist 234987118
PiperOrigin-RevId: 235019920
1 parent 5236a03 commit 8ffff9c

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

lib/java/com/google/android/material/checkbox/MaterialCheckBox.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
*
3636
* <p>This class uses attributes from the Material Theme to style a CheckBox. Excepting color
3737
* changes, it behaves identically to {@link AppCompatCheckBox}. Your theme's {@code
38-
* ?attr/colorControlActivated}, {@code ?attr/colorSurface}, and {@code ?attr/colorOnSurface} must
39-
* be set.
38+
* ?attr/colorSecondary}, {@code ?attr/colorSurface}, and {@code ?attr/colorOnSurface} must be set.
4039
*/
4140
public class MaterialCheckBox extends AppCompatCheckBox {
4241

@@ -104,12 +103,12 @@ public boolean isUseMaterialThemeColors() {
104103
private ColorStateList getMaterialThemeColorsTintList() {
105104
if (materialThemeColorsTintList == null) {
106105
int[] checkBoxColorsList = new int[ENABLED_CHECKED_STATES.length];
107-
int colorControlActivated = MaterialColors.getColor(this, R.attr.colorControlActivated);
106+
int colorSecondary = MaterialColors.getColor(this, R.attr.colorSecondary);
108107
int colorSurface = MaterialColors.getColor(this, R.attr.colorSurface);
109108
int colorOnSurface = MaterialColors.getColor(this, R.attr.colorOnSurface);
110109

111110
checkBoxColorsList[0] =
112-
MaterialColors.layer(colorSurface, colorControlActivated, MaterialColors.ALPHA_FULL);
111+
MaterialColors.layer(colorSurface, colorSecondary, MaterialColors.ALPHA_FULL);
113112
checkBoxColorsList[1] =
114113
MaterialColors.layer(colorSurface, colorOnSurface, MaterialColors.ALPHA_MEDIUM);
115114
checkBoxColorsList[2] =

lib/java/com/google/android/material/radiobutton/MaterialRadioButton.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
*
3636
* <p>This class uses attributes from the Material Theme to style a RadioButton. Excepting color
3737
* changes, it behaves identically to {@link AppCompatRadioButton}. Your theme's {@code
38-
* ?attr/colorControlActivated}, {@code ?attr/colorSurface}, and {@code ?attr/colorOnSurface} must
39-
* be set.
38+
* ?attr/colorSecondary}, {@code ?attr/colorSurface}, and {@code ?attr/colorOnSurface} must be set.
4039
*/
4140
public class MaterialRadioButton extends AppCompatRadioButton {
4241

@@ -103,13 +102,13 @@ public boolean isUseMaterialThemeColors() {
103102

104103
private ColorStateList getMaterialThemeColorsTintList() {
105104
if (materialThemeColorsTintList == null) {
106-
int colorControlActivated = MaterialColors.getColor(this, R.attr.colorControlActivated);
105+
int colorSecondary = MaterialColors.getColor(this, R.attr.colorSecondary);
107106
int colorOnSurface = MaterialColors.getColor(this, R.attr.colorOnSurface);
108107
int colorSurface = MaterialColors.getColor(this, R.attr.colorSurface);
109108

110109
int[] radioButtonColorList = new int[ENABLED_CHECKED_STATES.length];
111110
radioButtonColorList[0] =
112-
MaterialColors.layer(colorSurface, colorControlActivated, MaterialColors.ALPHA_FULL);
111+
MaterialColors.layer(colorSurface, colorSecondary, MaterialColors.ALPHA_FULL);
113112
radioButtonColorList[1] =
114113
MaterialColors.layer(colorSurface, colorOnSurface, MaterialColors.ALPHA_MEDIUM);
115114
radioButtonColorList[2] =

lib/java/com/google/android/material/switchmaterial/SwitchMaterial.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
* A class that creates a Material Themed Switch.
3434
*
3535
* <p>This class uses attributes from the Material Theme to style a Switch. Excepting color changes,
36-
* it behaves identically to {@link SwitchCompat}. Your theme's {@code ?attr/colorControlActivated},
37-
* {@code ?attr/colorSurface}, and {@code ?attr/colorOnSurface} must be set. Because {@link
38-
* SwitchCompat} does not extend {@link android.widget.Switch}, you must explicitly declare {@link
39-
* SwitchMaterial} in your layout XML.
36+
* it behaves identically to {@link SwitchCompat}. Your theme's {@code ?attr/colorSecondary}, {@code
37+
* ?attr/colorSurface}, and {@code ?attr/colorOnSurface} must be set. Because {@link SwitchCompat}
38+
* does not extend {@link android.widget.Switch}, you must explicitly declare {@link SwitchMaterial}
39+
* in your layout XML.
4040
*/
4141
public class SwitchMaterial extends SwitchCompat {
4242

@@ -113,15 +113,15 @@ public boolean isUseMaterialThemeColors() {
113113
private ColorStateList getMaterialThemeColorsThumbTintList() {
114114
if (materialThemeColorsThumbTintList == null) {
115115
int colorSurface = MaterialColors.getColor(this, R.attr.colorSurface);
116-
int colorControlActivated = MaterialColors.getColor(this, R.attr.colorControlActivated);
116+
int colorSecondary = MaterialColors.getColor(this, R.attr.colorSecondary);
117117

118118
int[] switchThumbColorsList = new int[ENABLED_CHECKED_STATES.length];
119119
switchThumbColorsList[0] =
120-
MaterialColors.layer(colorSurface, colorControlActivated, MaterialColors.ALPHA_FULL);
120+
MaterialColors.layer(colorSurface, colorSecondary, MaterialColors.ALPHA_FULL);
121121
switchThumbColorsList[1] =
122122
MaterialColors.layer(colorSurface, colorSurface, MaterialColors.ALPHA_FULL);
123123
switchThumbColorsList[2] =
124-
MaterialColors.layer(colorSurface, colorControlActivated, MaterialColors.ALPHA_DISABLED);
124+
MaterialColors.layer(colorSurface, colorSecondary, MaterialColors.ALPHA_DISABLED);
125125
switchThumbColorsList[3] =
126126
MaterialColors.layer(colorSurface, colorSurface, MaterialColors.ALPHA_FULL);
127127
materialThemeColorsThumbTintList =
@@ -134,15 +134,14 @@ private ColorStateList getMaterialThemeColorsTrackTintList() {
134134
if (materialThemeColorsTrackTintList == null) {
135135
int[] switchTrackColorsList = new int[ENABLED_CHECKED_STATES.length];
136136
int colorSurface = MaterialColors.getColor(this, R.attr.colorSurface);
137-
int colorControlActivated = MaterialColors.getColor(this, R.attr.colorControlActivated);
137+
int colorSecondary = MaterialColors.getColor(this, R.attr.colorSecondary);
138138
int colorOnSurface = MaterialColors.getColor(this, R.attr.colorOnSurface);
139139
switchTrackColorsList[0] =
140-
MaterialColors.layer(colorSurface, colorControlActivated, MaterialColors.ALPHA_MEDIUM);
140+
MaterialColors.layer(colorSurface, colorSecondary, MaterialColors.ALPHA_MEDIUM);
141141
switchTrackColorsList[1] =
142142
MaterialColors.layer(colorSurface, colorOnSurface, MaterialColors.ALPHA_LOW);
143143
switchTrackColorsList[2] =
144-
MaterialColors.layer(
145-
colorSurface, colorControlActivated, MaterialColors.ALPHA_DISABLED_LOW);
144+
MaterialColors.layer(colorSurface, colorSecondary, MaterialColors.ALPHA_DISABLED_LOW);
146145
switchTrackColorsList[3] =
147146
MaterialColors.layer(colorSurface, colorOnSurface, MaterialColors.ALPHA_DISABLED_LOW);
148147
materialThemeColorsTrackTintList =

0 commit comments

Comments
 (0)