SwipeCardEntry
Android credit card entry widget inspired by Swipe's UI, including sample code.
Install / Use
/learn @Rethought/SwipeCardEntryREADME
SwipeCardEntry
What is this?
SwipeCardEntry takes the simple, elegant credit card entry UI of Swipe and ports this to the Android Platform. In a nutshell SwipeCardEntry has:
- Support for Visa, Mastercard & American Express cards.
- Number validation using Luhn algorithm ensures the user will not enter an invalid number.
- Date validation ensures the user can only enter a valid expiry date.
SwipeCardEntry really is just a space saving, intuitive UI for card entry:
.. image:: demo.gif
Installation
Just copy over the SwipeCardEntryLibrary to your AndroidStudio project & add as a dependency.
General use
Simply add the view to your layout file:
.. code:: xml
<com.rethoughtsolutions.swipecardentry.SwipeCardEntry
android:id="@+id/swipecardentry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:drawable/editbox_background_normal" />
And add a listener for when the user has successfully entered a credit card:
.. code:: java
findViewById(R.id.swipecardentry).setListener(new SwipeCardEntry.Listener() {
@Override
public void onCardEntryCompleted(boolean completed) {
//...
}
});
Related Skills
node-connect
339.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
