Skip to content

Commit 7f9c6c0

Browse files
committed
Update attribute naming
1 parent 64eab78 commit 7f9c6c0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

buffertextinputlayout/src/main/java/org/buffer/android/buffertextinputlayout/BufferTextInputLayout.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ public BufferTextInputLayout(Context context, AttributeSet attrs, int defStyleAt
193193
R.styleable.BufferTextInputLayout_counterOverflowTextAppearance, 0);
194194
counterVisible = counterEnabled;
195195

196-
int type = a.getInt(R.styleable.BufferTextInputLayout_textInputMode, 2);
197-
counterMode = CounterMode.fromId(type);
196+
counterMode = CounterMode.fromId(
197+
a.getInt(R.styleable.BufferTextInputLayout_counterMode, 2));
198198

199199
charactersRemainingUntilCounterDisplay = a.getInt(
200200
R.styleable.BufferTextInputLayout_displayFromCount, getCounterMaxLength());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<!-- Whether to animate hint state changes. -->
2323
<attr name="hintAnimationEnabled" format="boolean" />
2424
<!-- The mode to use when formatting the text input layout counter -->
25-
<attr name="textInputMode" format="enum">
25+
<attr name="counterMode" format="enum">
2626
<enum name="descending" value="0" />
2727
<enum name="ascending" value="1" />
2828
<enum name="standard" value="2" />

sample/src/main/res/layout/activity_main.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
app:counterOverflowTextAppearance="@style/counterOverride"
2525
app:counterTextAppearance="@style/counterText"
2626
app:hintEnabled="true"
27-
app:textInputMode="ascending">
27+
app:counterMode="ascending">
2828

2929
<EditText
3030
android:layout_width="match_parent"
@@ -42,7 +42,7 @@
4242
app:counterOverflowTextAppearance="@style/counterOverride"
4343
app:counterTextAppearance="@style/counterText"
4444
app:hintEnabled="true"
45-
app:textInputMode="descending">
45+
app:counterMode="descending">
4646

4747
<EditText
4848
android:layout_width="match_parent"
@@ -60,7 +60,7 @@
6060
app:counterOverflowTextAppearance="@style/counterOverride"
6161
app:counterTextAppearance="@style/counterText"
6262
app:hintEnabled="true"
63-
app:textInputMode="standard">
63+
app:counterMode="standard">
6464

6565
<EditText
6666
android:layout_width="match_parent"
@@ -79,7 +79,7 @@
7979
app:counterTextAppearance="@style/counterText"
8080
app:hintEnabled="true"
8181
app:displayFromCount="5"
82-
app:textInputMode="descending">
82+
app:counterMode="descending">
8383

8484
<EditText
8585
android:layout_width="match_parent"

0 commit comments

Comments
 (0)