Skip to content

Commit c1cd100

Browse files
committed
fix counterTextColor -> mCounterTextColor
1 parent ba76e35 commit c1cd100

File tree

10 files changed

+25
-28
lines changed

10 files changed

+25
-28
lines changed

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jdk: oraclejdk8
33
android:
44
components:
55
- tools
6-
- build-tools-27.0.3
6+
- build-tools-28.0.3
77
- android-27
88
- extra-google-m2repository
99
- extra-android-m2repository

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ textFieldBoxes.validate()
437437
| Attribute | Description | Default |
438438
| --- | --- | --- |
439439
| `app:helperTextColor` | Helper text color | Current theme `textColorTertiary` |
440-
| `app:counterTextColor` | Counter text color | Current theme `textColorTertiary` |
440+
| `app:mCounterTextColor` | Counter text color | Current theme `textColorTertiary` |
441441
| `app:errorColor` | The color that is used to indicate error (e.g. exceeding max characters, `setError()`) | `A400 red` |
442442
| `app:primaryColor` | The color for the underline, the floating label text and the icon signifier **when HAVING FOCUS** | Current theme `colorPrimary` |
443443
| `app:secondaryColor` | The color for the underline, the floating label text and the icon signifier **when NOT HAVING FOCUS** | Current theme `textColorTertiary` |

README_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ textFieldBoxes.validate()
439439
| 属性 | 描述 | 默认值 |
440440
| --- | --- | --- |
441441
| `app:helperTextColor` | 帮助文本颜色 | 目前主题 `textColorTertiary` |
442-
| `app:counterTextColor` | 计数文本颜色 | 目前主题 `textColorTertiary` |
442+
| `app:mCounterTextColor` | 计数文本颜色 | 目前主题 `textColorTertiary` |
443443
| `app:errorColor` | 错误时的显示颜色 (e.g. 超出字符限制, `setError()`) | `A400 red` |
444444
| `app:primaryColor` | 底部的线、标签文字和首图标在**获得焦点时**的颜色 | 目前主题 `colorPrimary` |
445445
| `app:secondaryColor` | 底部的线、标签文字和首图标在**失去焦点时**的颜色 | 目前主题 `textColorTertiary` |

sample/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ dependencies {
2424
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
2525
exclude group: 'com.android.support', module: 'support-annotations'
2626
})
27-
implementation 'com.android.support:appcompat-v7:27.1.1'
28-
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
29-
implementation 'com.android.support:design:27.1.1'
27+
implementation 'com.android.support:appcompat-v7:28.0.0'
28+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
29+
implementation 'com.android.support:design:28.0.0'
3030
// compile 'com.github.HITGIF:TextFieldBoxes:1.4.1'
3131
implementation project(':textfieldboxes')
3232
testImplementation 'junit:junit:4.12'

textfieldboxes/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 27
5-
buildToolsVersion '27.0.3'
4+
compileSdkVersion 28
5+
buildToolsVersion '28.0.3'
66

77
defaultConfig {
88
minSdkVersion 15
9-
targetSdkVersion 27
9+
targetSdkVersion 28
1010

1111
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1212
}
@@ -23,7 +23,7 @@ dependencies {
2323
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
2424
exclude group: 'com.android.support', module: 'support-annotations'
2525
})
26-
implementation 'com.android.support:appcompat-v7:27.1.1'
27-
implementation 'com.android.support:design:27.1.1'
26+
implementation 'com.android.support:appcompat-v7:28.0.0'
27+
implementation 'com.android.support:design:28.0.0'
2828
testImplementation 'junit:junit:4.12'
2929
}

textfieldboxes/src/main/java/studio/carbonylgroup/textfieldboxes/TextFieldBoxes.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class TextFieldBoxes extends FrameLayout {
8181
/**
8282
* the text color for the counterLabel text. DEFAULT_TEXT_COLOR by default.
8383
*/
84-
protected int counterTextColor;
84+
protected int mCounterTextColor;
8585

8686
/**
8787
* the text color for when something is wrong (e.g. exceeding max characters, setError()).
@@ -501,8 +501,8 @@ protected void handleAttributes(Context context, AttributeSet attrs) {
501501
/* Colors */
502502
this.helperTextColor = styledAttrs
503503
.getInt(R.styleable.TextFieldBoxes_helperTextColor, DEFAULT_TEXT_COLOR);
504-
this.counterTextColor = styledAttrs
505-
.getInt(R.styleable.TextFieldBoxes_counterTextColor, DEFAULT_TEXT_COLOR);
504+
this.mCounterTextColor = styledAttrs
505+
.getInt(R.styleable.TextFieldBoxes_mCounterTextColor, DEFAULT_TEXT_COLOR);
506506
this.errorColor = styledAttrs
507507
.getInt(R.styleable.TextFieldBoxes_errorColor, DEFAULT_ERROR_COLOR);
508508
this.primaryColor = styledAttrs
@@ -863,7 +863,7 @@ protected void removeCounterError() {
863863
this.onError = false;
864864
if (this.hasFocus) setHighlightColor(this.primaryColor);
865865
else setHighlightColor(this.secondaryColor);
866-
this.counterLabel.setTextColor(this.counterTextColor);
866+
this.counterLabel.setTextColor(this.mCounterTextColor);
867867
}
868868

869869
/**
@@ -919,7 +919,7 @@ private void triggerSetters() {
919919

920920
/* Colors */
921921
setHelperTextColor(this.helperTextColor);
922-
setCounterTextColor(this.counterTextColor);
922+
setmCounterTextColor(this.mCounterTextColor);
923923
setErrorColor(this.errorColor);
924924
setPrimaryColor(this.primaryColor);
925925
setSecondaryColor(this.secondaryColor);
@@ -971,10 +971,10 @@ public void setHelperTextColor(int colorRes) {
971971
this.helperLabel.setTextColor(this.helperTextColor);
972972
}
973973

974-
public void setCounterTextColor(int colorRes) {
974+
public void setmCounterTextColor(int colorRes) {
975975

976-
this.counterTextColor = colorRes;
977-
this.counterLabel.setTextColor(this.counterTextColor);
976+
this.mCounterTextColor = colorRes;
977+
this.counterLabel.setTextColor(this.mCounterTextColor);
978978
}
979979

980980
public void setErrorColor(int colorRes) {
@@ -1199,8 +1199,8 @@ public int getHelperTextColor() {
11991199
return this.helperTextColor;
12001200
}
12011201

1202-
public int getCounterTextColor() {
1203-
return this.counterTextColor;
1202+
public int getmCounterTextColor() {
1203+
return this.mCounterTextColor;
12041204
}
12051205

12061206
public int getErrorColor() {

textfieldboxes/src/main/res/layout/text_field_boxes_layout_rtl.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
android:textSize="@dimen/label_text_size"
7171
tools:text="Label" />
7272

73-
<android.support.v4.widget.Space
73+
<android.widget.Space
7474
android:id="@+id/text_field_boxes_label_space"
7575
android:layout_width="wrap_content"
7676
android:layout_height="@dimen/label_space_height"
@@ -123,7 +123,7 @@
123123

124124
</LinearLayout>
125125

126-
<android.support.v4.widget.Space
126+
<android.widget.Space
127127
android:id="@+id/text_field_boxes_label_space_below"
128128
android:layout_width="wrap_content"
129129
android:layout_height="@dimen/label_space_height"

textfieldboxes/src/main/res/values/attrs.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<!--Colors-->
1111
<attr name="helperTextColor" format="color" />
12-
<attr name="counterTextColor" format="color" />
12+
<attr name="mCounterTextColor" format="color" />
1313
<attr name="errorColor" format="color" />
1414
<attr name="primaryColor" format="color" />
1515
<attr name="secondaryColor" format="color" />

0 commit comments

Comments
 (0)