Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Vatican-Cameos authored Jan 19, 2017
1 parent 4b25bea commit c93ae84
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ allprojects {
Add the dependency :
```java
dependencies {
compile 'com.github.GoodieBag:Pinview:v1.0'
compile 'com.github.GoodieBag:Pinview:v1.2'
}
```
Sync the gradle and that's it! :+1:

### Features :
* Flawless focus change to the consecutive pin box when the text is entered/deleted.
* When the user taps on the Pinview, the first empty box available is focused automatically (when the cursor is hidden).
* Listeners for onDataEntered ( To call can API when the pin is entered) and touch exists.
* Customisations are available for pin box sizes, background(drawables, selectors), inputType etc.

## Usage

### XML :
Expand Down Expand Up @@ -71,6 +77,18 @@ myLayout.addView(pin);
```
##### To get and set the pin values use the ```pin.getValue()``` and ```pin.setValue()``` methods respectively.

There is an event listener which is triggered when the user is done entering the otp which can be used as follows :
```java
pinview.setPinViewEventListener(new Pinview.PinViewEventListener() {
@Override
public void onDataEntered(Pinview pinview, boolean fromUser) {
//Make api calls here or what not
Toast.makeText(MainActivity.this, pinview.getValue(), Toast.LENGTH_SHORT).show();
}
});
```


## LICENSE
```
MIT License
Expand All @@ -95,3 +113,5 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```


0 comments on commit c93ae84

Please sign in to comment.