Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions app/app.iml

This file was deleted.

19 changes: 11 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion 28

defaultConfig {
vectorDrawables.useSupportLibrary = true
applicationId "com.cooltechworks.checkoutflow"
minSdkVersion 10
targetSdkVersion 25
minSdkVersion 16
targetSdkVersion 28

versionCode 2
versionName "1.1"

applicationId "com.cooltechworks.checkoutflow"

vectorDrawables.useSupportLibrary = true
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -21,6 +24,6 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':creditcarddesign')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':creditcarddesign')
}

This file was deleted.

6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:3.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -14,6 +17,7 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
maven{
url "https://jitpack.io"
Expand Down
23 changes: 13 additions & 10 deletions creditcarddesign/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ apply plugin: 'com.android.library'

android {

compileSdkVersion 25
buildToolsVersion "25.0.1"
compileSdkVersion 28

defaultConfig {
vectorDrawables.useSupportLibrary = true
minSdkVersion 10
targetSdkVersion 25
minSdkVersion 16
targetSdkVersion 28

versionCode 1
versionName "1.0.3"

vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
Expand All @@ -20,9 +22,10 @@ android {
}

dependencies {
final SUPPORT_VERSION = "25.0.1"
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:$SUPPORT_VERSION"
compile "com.android.support:cardview-v7:$SUPPORT_VERSION"
compile 'com.github.ozodrukh:CircularReveal:1.0.5'
api fileTree(dir: 'libs', include: ['*.jar'])
api "com.android.support:appcompat-v7:28.0.0"
api "com.android.support:cardview-v7:28.0.0"
api('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true
}
}
90 changes: 0 additions & 90 deletions creditcarddesign/creditcarddesign.iml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public static String handleCardNumber(String inputCardNumber) {
return handleCardNumber(inputCardNumber,SPACE_SEPERATOR);
}

public static String handleCardNumber(String inputCardNumber, CardType cardType) {

return handleCardNumber(inputCardNumber, SPACE_SEPERATOR, cardType);
}

public static CardType selectCardType(String cardNumber) {
Pattern pCardType = Pattern.compile(PATTERN_VISA);
if(pCardType.matcher(cardNumber).matches())
Expand All @@ -67,8 +72,11 @@ public static int selectCardLength(CardType cardType) {
}

public static String handleCardNumber(String inputCardNumber, String seperator) {
return handleCardNumber(inputCardNumber, seperator, selectCardType(inputCardNumber));
}

public static String handleCardNumber(String inputCardNumber, String seperator, CardType cardType) {
String unformattedText = inputCardNumber.replace(seperator, "");
CardType cardType = selectCardType(inputCardNumber);
String format = (cardType == CardType.AMEX_CARD) ? CARD_NUMBER_FORMAT_AMEX : CARD_NUMBER_FORMAT;
StringBuilder sbFormattedNumber = new StringBuilder();
for(int iIdx = 0, jIdx = 0; (iIdx < format.length()) && (unformattedText.length() > jIdx); iIdx++) {
Expand All @@ -82,8 +90,11 @@ public static String handleCardNumber(String inputCardNumber, String seperator)
}

public static String formatCardNumber(String inputCardNumber, String seperator) {
return formatCardNumber(inputCardNumber, seperator, selectCardType(inputCardNumber));
}

public static String formatCardNumber(String inputCardNumber, String seperator, CardType cardType) {
String unformattedText = inputCardNumber.replace(seperator, "");
CardType cardType = selectCardType(inputCardNumber);
String format = (cardType == CardType.AMEX_CARD) ? CARD_NUMBER_FORMAT_AMEX : CARD_NUMBER_FORMAT;
StringBuilder sbFormattedNumber = new StringBuilder();
for(int iIdx = 0, jIdx = 0; iIdx < format.length(); iIdx++) {
Expand Down
Loading