Skip to content

Commit

Permalink
Merge pull request #13 from swapnil1104/androidXmigration
Browse files Browse the repository at this point in the history
 Updated README.md
  • Loading branch information
swapnil1104 authored May 2, 2020
2 parents c7e19fa + 9ff6014 commit f514e88
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#444444"
tools:context=".MainActivity">

<TextView
Expand All @@ -26,14 +27,18 @@
android:padding="32dp"
app:oev_text_color="#dd1212"
android:textSize="30sp"
app:oev_primary_color="#CCFF00"
app:oev_box_style="@string/style_rounded_underline"
app:oev_secondary_color="#DADADA"
app:layout_constraintTop_toTopOf="parent"
app:oev_mask_character="ø¥"
app:oev_mask_character="*"
app:oev_mask_input="true" />

<Button
android:id="@+id/button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:visibility="gone"
android:onClick="displayText"
android:text="Click me"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
Binary file added images/dark_theme_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ private void init(Context context, AttributeSet attrs) {

// Set the TextWatcher
this.addTextChangedListener(this);

float multi = context.getResources().getDisplayMetrics().density;
mLineStroke = multi * mLineStroke;
mLineStrokeSelected = multi * mLineStrokeSelected;
Expand Down Expand Up @@ -140,27 +139,27 @@ private void getAttrsFromTypedArray(AttributeSet attributeSet) {
case UNDERLINE:
case ROUNDED_UNDERLINE:
mStrokePaint = new Paint(getPaint());
mStrokePaint.setStrokeWidth(4);
mStrokePaint.setStrokeWidth(8);
mStrokePaint.setStyle(Paint.Style.FILL);
break;

case SQUARE_BOX:
case ROUNDED_BOX:
mStrokePaint = new Paint(getPaint());
mStrokePaint.setStrokeWidth(4);
mStrokePaint.setStrokeWidth(8);
mStrokePaint.setStyle(Paint.Style.STROKE);
break;

default:
mStrokePaint = new Paint(getPaint());
mStrokePaint.setStrokeWidth(4);
mStrokePaint.setStrokeWidth(8);
mStrokePaint.setStyle(Paint.Style.FILL);

mBoxStyle = UNDERLINE;
}
} else {
mStrokePaint = new Paint(getPaint());
mStrokePaint.setStrokeWidth(4);
mStrokePaint.setStrokeWidth(8);
mStrokePaint.setStyle(Paint.Style.FILL);

mBoxStyle = UNDERLINE;
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ A customised EditText view serving the purpose of taking numeric **One Time Pass
With stunning animation, and high customizability.

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

## Packed with features
- Add custom character limit.
Expand Down

0 comments on commit f514e88

Please sign in to comment.