-
Notifications
You must be signed in to change notification settings - Fork 2
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
pascalcase
committed
Jan 31, 2020
1 parent
e715ab7
commit 54b0ce7
Showing
79 changed files
with
1,338 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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module external.linked.project.id="Bank Cards Iranian" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4"> | ||
<component name="FacetManager"> | ||
<facet type="java-gradle" name="Java-Gradle"> | ||
<configuration> | ||
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" /> | ||
<option name="BUILDABLE" value="false" /> | ||
</configuration> | ||
</facet> | ||
</component> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<excludeFolder url="file://$MODULE_DIR$/.gradle" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
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,135 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4"> | ||
<component name="FacetManager"> | ||
<facet type="android-gradle" name="Android-Gradle"> | ||
<configuration> | ||
<option name="GRADLE_PROJECT_PATH" value=":app" /> | ||
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="3.5.2" /> | ||
<option name="LAST_KNOWN_AGP_VERSION" value="3.5.2" /> | ||
</configuration> | ||
</facet> | ||
<facet type="android" name="Android"> | ||
<configuration> | ||
<option name="SELECTED_BUILD_VARIANT" value="debug" /> | ||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> | ||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> | ||
<afterSyncTasks> | ||
<task>generateDebugSources</task> | ||
</afterSyncTasks> | ||
<option name="ALLOW_USER_CONFIGURATION" value="false" /> | ||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> | ||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> | ||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/resValues/debug" /> | ||
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" /> | ||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> | ||
</configuration> | ||
</facet> | ||
</component> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> | ||
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/classes" /> | ||
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes" /> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugUnitTest/out" isTestSource="true" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> | ||
<excludeFolder url="file://$MODULE_DIR$/build" /> | ||
</content> | ||
<orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.12@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-integration:1.3@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-library:1.3@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: net.sf.kxml:kxml2:2.3.0@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: com.squareup:javawriter:2.1.1@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: javax.inject:javax.inject:1@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: com.google.code.findbugs:jsr305:2.0.1@jar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: androidx.test.ext:junit:1.1.1@aar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: androidx.test.espresso:espresso-core:3.2.0@aar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: androidx.test:runner:1.2.0@aar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: androidx.test:core:1.2.0@aar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: androidx.test:monitor:1.2.0@aar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: androidx.test.espresso:espresso-idling-resource:3.2.0@aar" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.13@jar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.collection:collection:1.1.0@jar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-common:2.1.0@jar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.arch.core:core-common:2.1.0@jar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.annotation:annotation:1.1.0@jar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.constraintlayout:constraintlayout-solver:1.1.3@jar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.appcompat:appcompat:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.fragment:fragment:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.appcompat:appcompat-resources:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.drawerlayout:drawerlayout:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.viewpager:viewpager:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.loader:loader:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.activity:activity:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.vectordrawable:vectordrawable-animated:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.vectordrawable:vectordrawable:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.customview:customview:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.core:core:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.cursoradapter:cursoradapter:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.versionedparcelable:versionedparcelable:1.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-viewmodel:2.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-runtime:2.1.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.savedstate:savedstate:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-livedata:2.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-livedata-core:2.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.interpolator:interpolator:1.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.arch.core:core-runtime:2.0.0@aar" level="project" /> | ||
<orderEntry type="library" name="Gradle: androidx.constraintlayout:constraintlayout:1.1.3@aar" level="project" /> | ||
<orderEntry type="module" module-name="bci" /> | ||
</component> | ||
</module> |
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,30 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.2" | ||
defaultConfig { | ||
applicationId "com.hta.bankcardsiranian" | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
testImplementation 'junit:junit:4.13' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
compile project(path: ':bci') | ||
} |
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# 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 |
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/com/hta/bankcardsiranian/ExampleInstrumentedTest.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,27 @@ | ||
package com.hta.bankcardsiranian; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
|
||
assertEquals("com.hta.bankcardsiranian", appContext.getPackageName()); | ||
} | ||
} |
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,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.hta.bankcardsiranian"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
57 changes: 57 additions & 0 deletions
57
app/src/main/java/com/hta/bankcardsiranian/MainActivity.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,57 @@ | ||
package com.hta.bankcardsiranian; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.os.Bundle; | ||
import android.widget.ImageView; | ||
import android.widget.Toast; | ||
|
||
import com.hta.bci.CardHandler; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
private CardHandler card; | ||
private String cardNo = "6037697515178959"; | ||
private String cardNoFake = "6037697515178958"; | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
|
||
card = new CardHandler(); | ||
|
||
|
||
// You can check validation card with card.CardValidation("Card Number") | ||
boolean statusCard = card.CardValidation(cardNo); | ||
Toast.makeText(getApplicationContext(),"Card1: " + statusCard,Toast.LENGTH_SHORT).show(); | ||
|
||
statusCard = card.CardValidation(cardNoFake); | ||
Toast.makeText(getApplicationContext(),"Card2: " + statusCard,Toast.LENGTH_SHORT).show(); | ||
|
||
|
||
//For Get Bank Name Or Bank Logo First Get Bank name With CardNo and get Bank logo with Bank name | ||
String bankName = card.BankName(cardNo,getApplicationContext()); | ||
Toast.makeText(getApplicationContext(),"BankName: " + bankName,Toast.LENGTH_SHORT).show(); | ||
|
||
|
||
// Get Logo with bank name | ||
Integer imgLogo = card.BankLogo(bankName,getApplicationContext()); | ||
|
||
// Set logo on ImageView whit this command | ||
//Logo.setImageResource(imgLogo); | ||
|
||
//For textWathcher | ||
/* | ||
if(edtCard.getText().toString().length() >= 6){ | ||
String bankN = cardHanlder.BankNameForTextWatcher(edtCard.getText().toString(),getApplicationContext()); | ||
imgLogo.setImageResource(cardHanlder.BankLogo(bankN,getApplicationContext())); | ||
}else { | ||
imgLogo.setImageDrawable(null); | ||
} | ||
}*/ | ||
|
||
|
||
|
||
} | ||
} |
Oops, something went wrong.