Skip to content

Commit fa3ea1d

Browse files
committed
changed mask character from * to a dot.
1 parent e41ecbe commit fa3ea1d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@
3232
<Button
3333
android:id="@+id/button"
3434
android:layout_width="0dp"
35-
android:onClick="displayText"
3635
android:layout_height="wrap_content"
36+
android:onClick="displayText"
3737
android:text="Click me"
3838
app:layout_constraintEnd_toEndOf="parent"
3939
app:layout_constraintStart_toStartOf="parent"
4040
app:layout_constraintTop_toBottomOf="@id/top" />
4141

4242
<TextView
43+
android:id="@+id/textView"
4344
android:layout_width="wrap_content"
4445
android:layout_height="wrap_content"
4546
android:layout_marginTop="80dp"
46-
android:id="@+id/textView"
4747
app:layout_constraintEnd_toEndOf="parent"
4848
app:layout_constraintStart_toStartOf="parent"
4949
app:layout_constraintTop_toBottomOf="@id/button" />

otpedittext2/src/main/java/com/broooapps/otpedittext2/OtpEditText.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ private void getAttrsFromTypedArray(AttributeSet attributeSet) {
122122
mMaskInput = a.getBoolean(R.styleable.OtpEditText_oev_mask_input, false);
123123
if (a.getString(R.styleable.OtpEditText_oev_mask_character) != null) {
124124
mMaskCharacter = String.valueOf(a.getString(R.styleable.OtpEditText_oev_mask_character)).substring(0, 1);
125+
} else {
126+
mMaskCharacter = getContext().getString(R.string.mask_character);
125127
}
126128

127129
if (mBoxStyle != null && !mBoxStyle.isEmpty()) {

otpedittext2/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<string name="style_rounded">rounded_box</string>
88
<string name="style_underline">underline</string>
99
<string name="style_rounded_underline">rounded_underline</string>
10+
<string name="mask_character">\u2022</string>
1011

1112
</resources>

0 commit comments

Comments
 (0)