Skip to content

Commit

Permalink
[Release] 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaosLeung committed Aug 26, 2018
1 parent 79babf2 commit 3d55572
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
}
dependencies {
compile 'com.chaos.view:pinview:1.4.1'
compile 'com.chaos.view:pinview:1.4.2'
}
```

Expand All @@ -31,7 +31,7 @@ Add PinView in your layout.

``` xml
<com.chaos.view.PinView
android:id="@+id/pinView"
android:id="@+id/firstPinView"
style="@style/PinWidget.PinView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -45,12 +45,13 @@ Add PinView in your layout.
android:textStyle="bold"
app:cursorColor="@color/line_selected"
app:cursorWidth="2dp"
app:hideLineWhenFilled="true"
app:itemCount="5"
app:itemHeight="48dp"
app:itemRadius="4dp"
app:itemSpacing="0dp"
app:itemWidth="36dp"
app:lineColor="@color/line_selected"
app:itemWidth="48dp"
app:lineColor="@color/line_colors"
app:lineWidth="2dp"
app:viewType="rectangle" />
```
Expand Down Expand Up @@ -82,6 +83,7 @@ pinView.addTextChangedListener(new TextWatcher() {...});
pinView.setItemBackgroundColor(Color.BLACK);
pinView.setItemBackground(getResources().getDrawable(R.drawable.item_background));
pinView.setItemBackgroundResources(R.drawable.item_background);
pinView.setHideLineWhenFilled(false);
```

### Step 2:
Expand Down Expand Up @@ -135,6 +137,7 @@ or add `android:cursorVisible="true"`.
* **cursorColor**, the cursor color.
* **cursorWidth**, the width of cursor.
* **itemBackground**, the item background.
* **hideLineWhenFilled**, specifies whether the line (border) should be hidden or visible when text entered.

## Thanks

Expand Down
2 changes: 1 addition & 1 deletion pinview/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def issueUrl = 'https://github.com/ChaosLeong/PinView/issues'
def gitUrl = 'git@github.com:ChaosLeong/PinView.git'

group = "com.chaos.view"
version = "1.4.1"
version = "1.4.2"

install {
repositories.mavenInstaller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void afterTextChanged(Editable s) {
pinView.setItemBackgroundColor(Color.BLACK);
pinView.setItemBackground(getResources().getDrawable(R.drawable.item_background));
pinView.setItemBackgroundResources(R.drawable.item_background);
pinView.setHideLineWhenFilled(false);
}

@Override
Expand Down
17 changes: 4 additions & 13 deletions simple/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
app:itemHeight="48dp"
app:itemRadius="4dp"
app:itemSpacing="0dp"
app:itemWidth="36dp"
app:lineColor="@color/line_selected"
app:itemWidth="48dp"
app:lineColor="@color/line_colors"
app:lineWidth="2dp"
app:viewType="rectangle" />

Expand All @@ -64,20 +64,10 @@
android:padding="@dimen/common_padding"
android:text="PIN"
android:textColor="@color/colorAccent"
app:hideLineWhenFilled="true"
app:itemCount="3"
app:viewType="line" />

<com.chaos.view.PinView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="text"
android:padding="@dimen/common_padding"
android:text="1"
android:textColor="@color/colorAccent"
app:itemCount="3"
app:viewType="line"
app:hideViewWhenEntered="true" />

<com.chaos.view.PinView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -93,6 +83,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberPassword"
android:itemBackground="@mipmap/ic_launcher"
android:padding="@dimen/common_padding"
android:text="1"
android:textColor="@color/colorAccent"
Expand Down

0 comments on commit 3d55572

Please sign in to comment.