-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6c015d1
Showing
31 changed files
with
1,329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/*.jks | ||
.gradle | ||
.DS_Store | ||
|
||
# generated files | ||
build/ | ||
app/build | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Eclipse project files | ||
.classpath | ||
.project | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Intellij project files | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# Gradle wrapper | ||
/gradle | ||
/gradlew | ||
/gradlew.bat | ||
gradle.properties | ||
|
||
app/src/androidTest/ | ||
app/src/test/ | ||
/app/google-services.json | ||
/captures/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 25 | ||
buildToolsVersion "25.0.2" | ||
|
||
dexOptions { | ||
javaMaxHeapSize "2g" | ||
} | ||
|
||
dataBinding { | ||
enabled = true | ||
} | ||
|
||
defaultConfig { | ||
applicationId "ru.adonixis.submitcreditcardflow" | ||
minSdkVersion 16 | ||
targetSdkVersion 25 | ||
versionCode 1 | ||
versionName "1.0" | ||
vectorDrawables.useSupportLibrary = true | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
zipAlignEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
|
||
debug { | ||
minifyEnabled false | ||
debuggable true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt') | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'com.android.support:appcompat-v7:25.0.1' | ||
compile 'com.android.support:cardview-v7:25.0.1' | ||
compile 'com.android.support:design:25.0.1' | ||
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in H:\Android\sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="ru.adonixis.submitcreditcardflow"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme" | ||
> | ||
<activity | ||
android:name=".SubmitCreditCardActivity" | ||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" | ||
android:screenOrientation="portrait" | ||
android:windowSoftInputMode="stateVisible|adjustResize" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Binary file not shown.
60 changes: 60 additions & 0 deletions
60
app/src/main/java/ru/adonixis/submitcreditcardflow/Card.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package ru.adonixis.submitcreditcardflow; | ||
|
||
public class Card { | ||
|
||
private String cardNumber; | ||
private String expiredDate; | ||
private String cardHolder; | ||
private String cvvCode; | ||
|
||
public Card() { | ||
} | ||
|
||
public Card(String cardNumber, String expiredDate, String cardHolder, String cvvCode) { | ||
this.cardNumber = cardNumber; | ||
this.expiredDate = expiredDate; | ||
this.cardHolder = cardHolder; | ||
this.cvvCode = cvvCode; | ||
} | ||
|
||
public String getCardNumber() { | ||
return cardNumber; | ||
} | ||
|
||
public void setCardNumber(String cardNumber) { | ||
this.cardNumber = cardNumber; | ||
} | ||
|
||
public String getExpiredDate() { | ||
return expiredDate; | ||
} | ||
|
||
public void setExpiredDate(String expiredDate) { | ||
this.expiredDate = expiredDate; | ||
} | ||
|
||
public String getCardHolder() { | ||
return cardHolder; | ||
} | ||
|
||
public void setCardHolder(String cardHolder) { | ||
this.cardHolder = cardHolder; | ||
} | ||
|
||
public String getCvvCode() { | ||
return cvvCode; | ||
} | ||
|
||
public void setCvvCode(String cvvCode) { | ||
this.cvvCode = cvvCode; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Card info:\r\n" + | ||
"Card number = " + cardNumber + "\r\n" + | ||
"Expired date = " + expiredDate + "\r\n" + | ||
"Card holder = " + cardHolder + "\r\n" + | ||
"CVV code = " + cvvCode; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
app/src/main/java/ru/adonixis/submitcreditcardflow/PTMonoTextView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package ru.adonixis.submitcreditcardflow; | ||
|
||
import android.content.Context; | ||
import android.graphics.Typeface; | ||
import android.support.v7.widget.AppCompatTextView; | ||
import android.util.AttributeSet; | ||
|
||
public class PTMonoTextView extends AppCompatTextView { | ||
|
||
public PTMonoTextView(Context context) { | ||
super(context); | ||
applyCustomFont(context); | ||
} | ||
|
||
public PTMonoTextView(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
applyCustomFont(context); | ||
} | ||
|
||
public PTMonoTextView(Context context, AttributeSet attrs, int defStyle) { | ||
super(context, attrs, defStyle); | ||
applyCustomFont(context); | ||
} | ||
|
||
private void applyCustomFont(Context context) { | ||
Typeface typeface = Typeface.createFromAsset(context.getAssets(), "fonts/PTM55FT.ttf"); | ||
setTypeface(typeface); | ||
} | ||
} |
Oops, something went wrong.