All Projects → shiburagi → BlockEditText

shiburagi / BlockEditText

Licence: Apache-2.0 license
Block EditText is a library provide an input view present in multiple block style that common use in TAC or credit card field.

Programming Languages

kotlin
9241 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to BlockEditText

Maskara
A simple way to format text fields without getting affected by input filters
Stars: ✭ 515 (+355.75%)
Mutual labels:  widget, edittext
Bankcardformat
💳 自动格式化银行卡号的EditText,卡号格式化、归属银行及卡别判断
Stars: ✭ 273 (+141.59%)
Mutual labels:  credit-card, edittext
EasyMoney-Widgets
The widgets (EditText and TextView) for support of money requirements like currency, number formatting, comma formatting etc.
Stars: ✭ 91 (-19.47%)
Mutual labels:  widget, edittext
Awesomecard
A Flutter package to easily create a Credit Card in your application.
Stars: ✭ 91 (-19.47%)
Mutual labels:  widget, credit-card
drag-down-to-pop-flutter
A page transition which supports drag-down-to-pop gesture.
Stars: ✭ 15 (-86.73%)
Mutual labels:  widget
credit-card-view
A fully customizable Android view that can display credit card's informations
Stars: ✭ 25 (-77.88%)
Mutual labels:  credit-card
Widget-Blur
This script for the Scriptable app creates widget backgrounds that appear to be transparent. You can also optionally emulate the light or dark blur effect used in the Batteries widget from Apple.
Stars: ✭ 113 (+0%)
Mutual labels:  widget
yii2-widget-cropbox
This widget allows crop image before upload to server and send informations about crop in JSON format.
Stars: ✭ 90 (-20.35%)
Mutual labels:  widget
AppStore-Connect-Widget
Open source AppStore sales monitor with widget
Stars: ✭ 36 (-68.14%)
Mutual labels:  widget
bromb
A feedback widget designed to be simple and customizable.
Stars: ✭ 41 (-63.72%)
Mutual labels:  widget
assist
Blocknative Assist widget for blockchain usability
Stars: ✭ 54 (-52.21%)
Mutual labels:  widget
file manager
FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more. Designed to feel like part of the Flutter framework.
Stars: ✭ 38 (-66.37%)
Mutual labels:  widget
yii2-highcharts-widget
HighCharts Js Widget for Yii2
Stars: ✭ 40 (-64.6%)
Mutual labels:  widget
currency-edittext
A Custom EditText implementation that allows formatting of currency-based numeric inputs.
Stars: ✭ 86 (-23.89%)
Mutual labels:  edittext
AutoFormatInputWatcher
This repository contains input watcher for auto formatting digits in edit text
Stars: ✭ 15 (-86.73%)
Mutual labels:  edittext
masked-input
Mask input with simple API and rich customization
Stars: ✭ 44 (-61.06%)
Mutual labels:  credit-card
com.iatspayments.civicrm
CiviCRM Extension supporting iATS Payments services
Stars: ✭ 13 (-88.5%)
Mutual labels:  credit-card
react-payment-request-api
High order component to drive Payment Request widget
Stars: ✭ 58 (-48.67%)
Mutual labels:  credit-card
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (-46.9%)
Mutual labels:  edittext
image-discovery-app-js
JavaScript Image Discovery Web Application. Use to search, discover, filter, and manipulate imagery.
Stars: ✭ 22 (-80.53%)
Mutual labels:  widget

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.
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].