diff --git a/.idea/misc.xml b/.idea/misc.xml index 57efd26..9443f35 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -35,7 +35,7 @@ - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 2c8d0ce..0c976da 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,11 +3,8 @@ - - - \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index efad73a..b449dd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ jdk: oraclejdk8 android: components: - tools - - build-tools-27.0.3 + - build-tools-28.0.3 - android-27 - extra-google-m2repository - extra-android-m2repository diff --git a/README.md b/README.md index bb94d12..1d08132 100644 --- a/README.md +++ b/README.md @@ -437,7 +437,7 @@ textFieldBoxes.validate() | Attribute | Description | Default | | --- | --- | --- | | `app:helperTextColor` | Helper text color | Current theme `textColorTertiary` | -| `app:counterTextColor` | Counter text color | Current theme `textColorTertiary` | +| `app:mCounterTextColor` | Counter text color | Current theme `textColorTertiary` | | `app:errorColor` | The color that is used to indicate error (e.g. exceeding max characters, `setError()`) | `A400 red` | | `app:primaryColor` | The color for the underline, the floating label text and the icon signifier **when HAVING FOCUS** | Current theme `colorPrimary` | | `app:secondaryColor` | The color for the underline, the floating label text and the icon signifier **when NOT HAVING FOCUS** | Current theme `textColorTertiary` | diff --git a/README_CN.md b/README_CN.md index 518a5cd..ff997f0 100644 --- a/README_CN.md +++ b/README_CN.md @@ -439,7 +439,7 @@ textFieldBoxes.validate() | 属性 | 描述 | 默认值 | | --- | --- | --- | | `app:helperTextColor` | 帮助文本颜色 | 目前主题 `textColorTertiary` | -| `app:counterTextColor` | 计数文本颜色 | 目前主题 `textColorTertiary` | +| `app:mCounterTextColor` | 计数文本颜色 | 目前主题 `textColorTertiary` | | `app:errorColor` | 错误时的显示颜色 (e.g. 超出字符限制, `setError()`) | `A400 red` | | `app:primaryColor` | 底部的线、标签文字和首图标在**获得焦点时**的颜色 | 目前主题 `colorPrimary` | | `app:secondaryColor` | 底部的线、标签文字和首图标在**失去焦点时**的颜色 | 目前主题 `textColorTertiary` | diff --git a/sample/build.gradle b/sample/build.gradle index 09c347b..864211f 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -24,9 +24,9 @@ dependencies { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support.constraint:constraint-layout:1.1.0' - implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'com.android.support:design:28.0.0' // compile 'com.github.HITGIF:TextFieldBoxes:1.4.1' implementation project(':textfieldboxes') testImplementation 'junit:junit:4.12' diff --git a/textfieldboxes/build.gradle b/textfieldboxes/build.gradle index 282c098..addb8fc 100644 --- a/textfieldboxes/build.gradle +++ b/textfieldboxes/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 27 - buildToolsVersion '27.0.3' + compileSdkVersion 28 + buildToolsVersion '28.0.3' defaultConfig { minSdkVersion 15 - targetSdkVersion 27 + targetSdkVersion 28 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -23,7 +23,7 @@ dependencies { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:design:28.0.0' testImplementation 'junit:junit:4.12' } diff --git a/textfieldboxes/src/main/java/studio/carbonylgroup/textfieldboxes/TextFieldBoxes.java b/textfieldboxes/src/main/java/studio/carbonylgroup/textfieldboxes/TextFieldBoxes.java index b308547..edc08ef 100644 --- a/textfieldboxes/src/main/java/studio/carbonylgroup/textfieldboxes/TextFieldBoxes.java +++ b/textfieldboxes/src/main/java/studio/carbonylgroup/textfieldboxes/TextFieldBoxes.java @@ -81,7 +81,7 @@ public class TextFieldBoxes extends FrameLayout { /** * the text color for the counterLabel text. DEFAULT_TEXT_COLOR by default. */ - protected int counterTextColor; + protected int mCounterTextColor; /** * 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) { /* Colors */ this.helperTextColor = styledAttrs .getInt(R.styleable.TextFieldBoxes_helperTextColor, DEFAULT_TEXT_COLOR); - this.counterTextColor = styledAttrs - .getInt(R.styleable.TextFieldBoxes_counterTextColor, DEFAULT_TEXT_COLOR); + this.mCounterTextColor = styledAttrs + .getInt(R.styleable.TextFieldBoxes_mCounterTextColor, DEFAULT_TEXT_COLOR); this.errorColor = styledAttrs .getInt(R.styleable.TextFieldBoxes_errorColor, DEFAULT_ERROR_COLOR); this.primaryColor = styledAttrs @@ -863,7 +863,7 @@ protected void removeCounterError() { this.onError = false; if (this.hasFocus) setHighlightColor(this.primaryColor); else setHighlightColor(this.secondaryColor); - this.counterLabel.setTextColor(this.counterTextColor); + this.counterLabel.setTextColor(this.mCounterTextColor); } /** @@ -919,7 +919,7 @@ private void triggerSetters() { /* Colors */ setHelperTextColor(this.helperTextColor); - setCounterTextColor(this.counterTextColor); + setmCounterTextColor(this.mCounterTextColor); setErrorColor(this.errorColor); setPrimaryColor(this.primaryColor); setSecondaryColor(this.secondaryColor); @@ -971,10 +971,10 @@ public void setHelperTextColor(int colorRes) { this.helperLabel.setTextColor(this.helperTextColor); } - public void setCounterTextColor(int colorRes) { + public void setmCounterTextColor(int colorRes) { - this.counterTextColor = colorRes; - this.counterLabel.setTextColor(this.counterTextColor); + this.mCounterTextColor = colorRes; + this.counterLabel.setTextColor(this.mCounterTextColor); } public void setErrorColor(int colorRes) { @@ -1199,8 +1199,8 @@ public int getHelperTextColor() { return this.helperTextColor; } - public int getCounterTextColor() { - return this.counterTextColor; + public int getmCounterTextColor() { + return this.mCounterTextColor; } public int getErrorColor() { diff --git a/textfieldboxes/src/main/res/layout/text_field_boxes_layout_rtl.xml b/textfieldboxes/src/main/res/layout/text_field_boxes_layout_rtl.xml index fc4efa4..13d1077 100644 --- a/textfieldboxes/src/main/res/layout/text_field_boxes_layout_rtl.xml +++ b/textfieldboxes/src/main/res/layout/text_field_boxes_layout_rtl.xml @@ -70,7 +70,7 @@ android:textSize="@dimen/label_text_size" tools:text="Label" /> - - - +