Skip to content

Commit f514e88

Browse files
authored
Merge pull request #13 from swapnil1104/androidXmigration
Updated README.md
2 parents c7e19fa + 9ff6014 commit f514e88

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

.idea/checkstyle-idea.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7+
android:background="#444444"
78
tools:context=".MainActivity">
89

910
<TextView
@@ -26,14 +27,18 @@
2627
android:padding="32dp"
2728
app:oev_text_color="#dd1212"
2829
android:textSize="30sp"
30+
app:oev_primary_color="#CCFF00"
31+
app:oev_box_style="@string/style_rounded_underline"
32+
app:oev_secondary_color="#DADADA"
2933
app:layout_constraintTop_toTopOf="parent"
30-
app:oev_mask_character="ø¥"
34+
app:oev_mask_character="*"
3135
app:oev_mask_input="true" />
3236

3337
<Button
3438
android:id="@+id/button"
3539
android:layout_width="0dp"
3640
android:layout_height="wrap_content"
41+
android:visibility="gone"
3742
android:onClick="displayText"
3843
android:text="Click me"
3944
app:layout_constraintEnd_toEndOf="parent"

images/dark_theme_demo.gif

8.05 KB
Loading

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ private void init(Context context, AttributeSet attrs) {
7878

7979
// Set the TextWatcher
8080
this.addTextChangedListener(this);
81-
8281
float multi = context.getResources().getDisplayMetrics().density;
8382
mLineStroke = multi * mLineStroke;
8483
mLineStrokeSelected = multi * mLineStrokeSelected;
@@ -140,27 +139,27 @@ private void getAttrsFromTypedArray(AttributeSet attributeSet) {
140139
case UNDERLINE:
141140
case ROUNDED_UNDERLINE:
142141
mStrokePaint = new Paint(getPaint());
143-
mStrokePaint.setStrokeWidth(4);
142+
mStrokePaint.setStrokeWidth(8);
144143
mStrokePaint.setStyle(Paint.Style.FILL);
145144
break;
146145

147146
case SQUARE_BOX:
148147
case ROUNDED_BOX:
149148
mStrokePaint = new Paint(getPaint());
150-
mStrokePaint.setStrokeWidth(4);
149+
mStrokePaint.setStrokeWidth(8);
151150
mStrokePaint.setStyle(Paint.Style.STROKE);
152151
break;
153152

154153
default:
155154
mStrokePaint = new Paint(getPaint());
156-
mStrokePaint.setStrokeWidth(4);
155+
mStrokePaint.setStrokeWidth(8);
157156
mStrokePaint.setStyle(Paint.Style.FILL);
158157

159158
mBoxStyle = UNDERLINE;
160159
}
161160
} else {
162161
mStrokePaint = new Paint(getPaint());
163-
mStrokePaint.setStrokeWidth(4);
162+
mStrokePaint.setStrokeWidth(8);
164163
mStrokePaint.setStyle(Paint.Style.FILL);
165164

166165
mBoxStyle = UNDERLINE;

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ A customised EditText view serving the purpose of taking numeric **One Time Pass
88
With stunning animation, and high customizability.
99

1010
![Demo with underline](images/demo2.gif)
11+
![Dark theme demo](images/dark_theme_demo.gif)
1112

1213
## Packed with features
1314
- Add custom character limit.

0 commit comments

Comments
 (0)