• Stars
    star
    120
  • Rank 286,975 (Top 6 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Block EditText is a library provide an input view present in multiple block style that common use in TAC or credit card field.

BlockEditText

Download

Block EditText is a library provide an input view present in multiple block style that common use in TAC or credit card field.

Alt Text

Android 14.0+ support


Buy Me a Coffee at ko-fi.com paypal

Including In Your Project

If you are a Maven user you can easily include the library by specifying it as a dependency:

Gradle

repositories {
 maven{
   maven { url 'https://jitpack.io' }
 }
}
dependencies {
	 implementation 'com.github.shiburagi:BlockEditText:v0.2'
}

or, you can include it by download this project and import /blockedittext as module.

How to use

Creating the layout

TAC

<com.infideap.blockedittext.BlockEditText
    android:id="@+id/blockEditText_tac"
    app:defaultLength="1"
    app:numberOfBlock="4"
    app:inputType="Integer"
    app:hintTextAppearance="@style/TextAppearance.AppCompat.Medium"
    app:hint="TAC"
    app:textSize="24sp"
    android:layout_width="300dp"
    app:editTextBackground="@drawable/selector_edittext_round_border"
    android:layout_height="wrap_content" />

Credit Card

<com.infideap.blockedittext.BlockEditText
    android:id="@+id/blockEditText_visa"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:defaultLength="4"
    app:hint="Visa/Mastercard"
    app:hintTextAppearance="@style/TextAppearance.AppCompat.Medium"
    app:inputType="Integer"
    app:numberOfBlock="4"
    app:text="131321323-13213-21321312" />

Customize

amexEditText.setNumberOfBlock(3);
amexEditText.setDefaultLength(4);
amexEditText.setLengthAt(1,6);

amexEditText.setHint("Amex");
amexEditText.setText("1234567890");
amexEditText.getText();

amexEditText.setTextSize(16);
amexEditText.setHintTextSize(16);
amexEditText.setSeparatorTextSize(16);

amexEditText.setSeparatorCharacter('-');
amexEditText.setSeparatorPadding(8);

amexEditText.setInputType(InputType.TYPE_CLASS_NUMBER);

amexEditText.setTextAppearance(android.support.v7.appcompat.R.style.Base_TextAppearance_AppCompat_Medium);
amexEditText.setHintTextAppearance(android.support.v7.appcompat.R.style.Base_TextAppearance_AppCompat_Medium);
amexEditText.setSeparatorTextAppearance(android.support.v7.appcompat.R.style.Base_TextAppearance_AppCompat_Medium);

amexEditText.setEdiTextBackground(ContextCompat.getDrawable(this, R.drawable.selector_edittext_round_border_line));

amexEditText.setSelection(0);
amexEditText.setShiftPosition(true);

amexEditText.addCardPrefix(CardPrefix.amex(this))
amexEditText.addCardPrefix(CardPrefix.amex(amexDrawable))
amexEditText.addCardPrefix(new CardPrefix(this, R.drawable.ic_amex, "34"))
amexEditText.addCardPrefix(new CardPrefix(amexDrawable, "34"))

Listener

amexEditText.setTextChangedListener(TextWatcher watcher)
amexEditText.setOnCardPrefixListener(OnCardPrefixListener listener)

Contact

For any enquiries, please send an email to [email protected].

License

Copyright 2018 Shiburagi

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.

More Repositories

1

Drawer-Behavior

Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
Kotlin
585
star
2

Drawer-Behavior-Flutter

Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
Dart
209
star
3

Stylish-Widget-for-Android

StylishWidget is a library for an Android Application project to make the UI more beautiful and allow to use third party font. This library also contain few view that created by me.
Java
39
star
4

Messaging-App

Java
29
star
5

payment_flow_challenge

Dart
23
star
6

payment_flow_bank

Dart
17
star
7

Atomic

An android restful api/networking library using okhttp library as backbone.
Kotlin
14
star
8

Reward-App-Flutter-UI

Dart
14
star
9

JsonToDart

VS Code Extension
TypeScript
9
star
10

ExpandableRecycler

A library provide expand & collapse state for recyclerview.
Java
8
star
11

Locale-Editor

an application to convert multi-language Android/ Swift strings file to excel file, and otherwise
Java
7
star
12

Calendar-View-Flutter-UI

Dart
7
star
13

Todo-App-Flutter-Complete

Dart
6
star
14

whatsapp-searchbar

Android Search Bar like Whatsapp app
Java
5
star
15

BlockEditText-Kotlin

Kotlin
4
star
16

Coordinator-Layout---Flutter

a Library contains widget/layout to handle collapsing header behavio
Dart
3
star
17

Pinterest-Clone

Kotlin
3
star
18

MinimalMUI

A Material UI template for react js
JavaScript
3
star
19

ordering_app

Dart
2
star
20

Todo-App-Flutter

Dart
2
star
21

todo_flutter_app

Dart
1
star
22

flutter_geofence

Dart
1
star
23

shiburagi

1
star
24

flutter_messenger_app_challenge

Dart
1
star
25

SignUpPhone

Java
1
star
26

MinimalMUI_Flutter

Dart
1
star
27

marketplace-template-flutter

Dart
1
star
28

zariman_dev

Dart
1
star
29

Challenge_404

Dart
1
star
30

Whatsapp-Indicator-TabLayout

Android TabLayout with Indicator like Whatsapp
Java
1
star
31

Firestore-Experiment

Java
1
star
32

JsonToAndroidView

Java
1
star