All Projects → sh3lan93 → VerifyBlocksView

sh3lan93 / VerifyBlocksView

Licence: other
Android view for providing blocks (Edit Texts) to achieve verification process.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to VerifyBlocksView

Verifyedittext
带下划线的验证码输入框
Stars: ✭ 103 (+267.86%)
Mutual labels:  verification, edittext
Sharpview
安卓带有尖角气泡的控件(TextView,ImageView,EditText,Layout),支持渐变色,圆角等自定义属性
Stars: ✭ 137 (+389.29%)
Mutual labels:  view, edittext
android-prefix-suffix-edit-text
EditText with support for non editable prefix and suffix.
Stars: ✭ 36 (+28.57%)
Mutual labels:  view, edittext
ViewWorld
自定义View合集,展示各种自定义View/控件。项目包含了自定义Banner轮播图控件,自定义验证码输入框,自定义TabLayout等控件,持续更新中😉😉😉
Stars: ✭ 94 (+235.71%)
Mutual labels:  view, edittext
Viewtooltip
A fluent tooltip for Android
Stars: ✭ 1,029 (+3575%)
Mutual labels:  view, edittext
Hyena
鬣狗快速开发库(2018年6月停止维护)
Stars: ✭ 21 (-25%)
Mutual labels:  view, edittext
TextBanner
搜索栏文字轮播切换控件,京东淘宝头条资讯轮播
Stars: ✭ 35 (+25%)
Mutual labels:  view
SwiftUIViewRecorder
Efficiently record any SwiftUI View as image or video
Stars: ✭ 20 (-28.57%)
Mutual labels:  view
amcheck
contrib/amcheck from Postgres v11 backported to earlier Postgres versions
Stars: ✭ 74 (+164.29%)
Mutual labels:  verification
AutoFormatInputWatcher
This repository contains input watcher for auto formatting digits in edit text
Stars: ✭ 15 (-46.43%)
Mutual labels:  edittext
GonioView
Android view to represent an angle measurement (Goniometry)
Stars: ✭ 27 (-3.57%)
Mutual labels:  view
fingerprint
Fingerprint is a simple tool that can be used to verify the contents of a directory.
Stars: ✭ 71 (+153.57%)
Mutual labels:  verification
email-checker
Provides email verification on the go.
Stars: ✭ 116 (+314.29%)
Mutual labels:  verification
SwiftyCodeView
Fully customizable UI Component for verification codes written in swift with RxSwift support!
Stars: ✭ 86 (+207.14%)
Mutual labels:  verification
fastedit
安卓端高性能输入框。
Stars: ✭ 38 (+35.71%)
Mutual labels:  edittext
react-native-masonry-brick-list
Staggered Or Masonary List View For React Native Written in pure js
Stars: ✭ 24 (-14.29%)
Mutual labels:  view
react-native-super-ellipse-mask
Apple flavored smooth corners for React Native
Stars: ✭ 55 (+96.43%)
Mutual labels:  view
table-layout
Styleable plain-text table generator. Useful for formatting console output.
Stars: ✭ 18 (-35.71%)
Mutual labels:  view
VerificationCode
简单的滑动验证码JS插件 图片验证码
Stars: ✭ 15 (-46.43%)
Mutual labels:  verification
android-constraintlayout-demo
Demo usage of various ConstraintLayout features
Stars: ✭ 49 (+75%)
Mutual labels:  view

VerifyBlocksView Android Arsenal API

Android view for providing blocks (Edit Texts) to achieve verification process. This view is enhanced with move to next view when user enter a value in edit text. Providing some methods for controlling value in verification view

Screenshot Video Demo

Usage

Adding Dependency

Add this to build.gradle Project level

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
 }

Add this to build.gradle Module:app

dependencies {
  compile 'com.github.sh3lan93:VerifyBlocksView:1.2'
}

for maven usage

<repositories>
    <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
		</repository>
</repositories>

and then add dependency

<dependency>
    <groupId>com.github.sh3lan93</groupId>
    <artifactId>VerifyBlocksView</artifactId>
    <version>1.2</version>
</dependency>

Adding The View

  • XML
<com.shalan.mohamed.verificationview.VerifyView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/verifyView"
    android:layout_marginTop="8dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:num_of_blocks="6"
    app:blocks_text_color="@android:color/holo_blue_bright"
    />
  • Java
verifyView = findViewById(R.id.verifyView);
String codeText = verifyView.getTextEntered();
verifyView.setBlockHint(R.string._1);
verifyView.getBlockValue("1");
ArrayList<String> valuesEntered = verifyView.getValues();
verifyView.setBlockValueListener(new BlocksValuesListener() {
        @Override
        public void onValueChange(String value, String tag) {
          //value is the value entered in focused block
          //tag is the number of focused block e.g: block number 0
          //start blocks number = 0, end blocks number is number_of_blocks - 1
        }
});

XML attributes

Attribute Description
app:num_of_blocks Define the number of blocks you want to be displayed
app:blocks_text_color Define the text color of verification blocks

Java Methods

Method Description
setViewTextTypeFace(AssetManager manager, String path) set the font of verification blocks
ArrayList getValues() return array of texts in verification blocks
String getBlockValue(String tag) return the text value for a given verification block number e.g: 0, 1
setBlockValueListener(BlocksValuesListener blockValueListener) for setting listener for getting the last value entered while user entering text
setBlockHint(String hint) for setting the hint of verification blocks
setBlockHint(@StringRes int hint) for setting the hint of verification blocks
String getTextEntered() for getting all texts entered in verification blocks e.g: 12345

License

Copyright 2017 Mohamed Fotouh Shalan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].