Android Passcode Keypad View

A custom view with keyboard and character display to be used for authentication.

The view has a bunch customisation options to make to look and work the way whichever needed.

Demo

Installation

Add gradle dependency

repositories { jcenter() } dependencies { compile 'in.arjsna:passcodeview:1.2.1' }

Usage

Add the view in the layout file

< in .arjsna.lib.PassCodeView android : id = " @+id/pass_code_view " android : layout_width = " match_parent " android : layout_height = " wrap_content " app : digits = " 4 " app : digit_size = " 30.0dp " app : key_text_size = " 30.0sp " android : padding = " 25.0dp " app : empty_drawable = " @drawable/empty_dot " app : filled_drawable = " @drawable/filled_dot " />

View attributes that can be included in xml are

digits - number of digits in passcode

filled_drawable - drawable to be show for filled digits

empty_drawable - drawable to be show for empty digits

key_text_size - size of text in keyboard's key

digit_spacing - horizontal space between each digit

digit_vertical_padding - vertical padding of digits

divider_visible - boolean to show or hide divider between digits and keyboard

Other customisations options available are