accurascan_kyc 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +635 -0
- package/accurascan-kyc.podspec +38 -0
- package/android/build.gradle +118 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +18 -0
- package/android/src/main/java/com/accurascankyc/AccurascanKycModule.java +507 -0
- package/android/src/main/java/com/accurascankyc/AccurascanKycPackage.java +28 -0
- package/android/src/main/java/com/accurascankyc/ActivityFaceMatch.java +533 -0
- package/android/src/main/java/com/accurascankyc/BorderTextView.java +82 -0
- package/android/src/main/java/com/accurascankyc/OcrActivity.java +1263 -0
- package/android/src/main/java/com/accurascankyc/OcrResultActivity.java +736 -0
- package/android/src/main/java/com/accurascankyc/ReactNativeJson.java +123 -0
- package/android/src/main/java/com/accurascankyc/UnsafeOkHttpClient.java +57 -0
- package/android/src/main/res/drawable/btn_bg_gray.xml +6 -0
- package/android/src/main/res/drawable/btn_bg_red.xml +6 -0
- package/android/src/main/res/drawable/btn_bg_trasparent_bottom.xml +6 -0
- package/android/src/main/res/drawable/flip_camera_icon.png +0 -0
- package/android/src/main/res/drawable/ic_close.xml +5 -0
- package/android/src/main/res/drawable/round_border_rect.xml +12 -0
- package/android/src/main/res/drawable/splash.png +0 -0
- package/android/src/main/res/drawable-v24/ic_launcher_foreground.png +0 -0
- package/android/src/main/res/drawable-xhdpi/bg_home.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ic_barcode.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ic_biometric.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ic_check.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ic_liveness.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ic_result.png +0 -0
- package/android/src/main/res/drawable-xhdpi/ic_scan.png +0 -0
- package/android/src/main/res/drawable-xhdpi/img_button_overlay.png +0 -0
- package/android/src/main/res/layout/activity_ocr_result.xml +18 -0
- package/android/src/main/res/layout/activity_splash.xml +26 -0
- package/android/src/main/res/layout/custom_frame_layout.xml +144 -0
- package/android/src/main/res/layout/ocr_activity.xml +28 -0
- package/android/src/main/res/layout-land/custom_frame_layout.xml +144 -0
- package/android/src/main/res/layout-land/ocr_activity.xml +41 -0
- package/android/src/main/res/menu/menu_land_port.xml +7 -0
- package/android/src/main/res/mipmap-hdpi/logo_loign.png +0 -0
- package/android/src/main/res/mipmap-mdpi/logo_loign.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_document_verified.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/logo_loign.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/logo_loign.png +0 -0
- package/android/src/main/res/values/colors.xml +31 -0
- package/android/src/main/res/values/strings.xml +42 -0
- package/android/src/main/res/values/styles.xml +191 -0
- package/ios/AccurascanKyc-Bridging-Header.h +2 -0
- package/ios/AccurascanKyc.m +34 -0
- package/ios/AccurascanKyc.swift +649 -0
- package/ios/AccurascanKyc.xcodeproj/project.pbxproj +283 -0
- package/ios/AccurascanKyc.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -0
- package/ios/FMController.swift +587 -0
- package/ios/LVController.swift +346 -0
- package/ios/MainStoryboard_iPhone.storyboard +338 -0
- package/ios/ViewController.swift +2686 -0
- package/ios/resources/back_icon.png +0 -0
- package/ios/resources/flip_camera_icon.png +0 -0
- package/ios/resources/flip_document_icon.png +0 -0
- package/ios/resources/ic_logo.png +0 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +161 -0
- package/src/index.tsx +5 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
package com.accurascankyc;
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
4
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
5
|
+
import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
|
6
|
+
import com.facebook.react.bridge.WritableArray;
|
|
7
|
+
import com.facebook.react.bridge.WritableMap;
|
|
8
|
+
import com.facebook.react.bridge.WritableNativeArray;
|
|
9
|
+
import com.facebook.react.bridge.WritableNativeMap;
|
|
10
|
+
|
|
11
|
+
import org.json.JSONArray;
|
|
12
|
+
import org.json.JSONException;
|
|
13
|
+
import org.json.JSONObject;
|
|
14
|
+
|
|
15
|
+
import java.util.Iterator;
|
|
16
|
+
|
|
17
|
+
class ReactNativeJSON {
|
|
18
|
+
|
|
19
|
+
public static WritableMap convertJsonToMap(JSONObject jsonObject) throws JSONException {
|
|
20
|
+
WritableMap map = new WritableNativeMap();
|
|
21
|
+
|
|
22
|
+
Iterator<String> iterator = jsonObject.keys();
|
|
23
|
+
while (iterator.hasNext()) {
|
|
24
|
+
String key = iterator.next();
|
|
25
|
+
Object value = jsonObject.get(key);
|
|
26
|
+
if (value instanceof JSONObject) {
|
|
27
|
+
map.putMap(key, convertJsonToMap((JSONObject) value));
|
|
28
|
+
} else if (value instanceof JSONArray) {
|
|
29
|
+
map.putArray(key, convertJsonToArray((JSONArray) value));
|
|
30
|
+
} else if (value instanceof Boolean) {
|
|
31
|
+
map.putBoolean(key, (Boolean) value);
|
|
32
|
+
} else if (value instanceof Integer) {
|
|
33
|
+
map.putInt(key, (Integer) value);
|
|
34
|
+
} else if (value instanceof Double) {
|
|
35
|
+
map.putDouble(key, (Double) value);
|
|
36
|
+
} else if (value instanceof String) {
|
|
37
|
+
map.putString(key, (String) value);
|
|
38
|
+
} else {
|
|
39
|
+
map.putString(key, value.toString());
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return map;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public static WritableArray convertJsonToArray(JSONArray jsonArray) throws JSONException {
|
|
46
|
+
WritableArray array = new WritableNativeArray();
|
|
47
|
+
|
|
48
|
+
for (int i = 0; i < jsonArray.length(); i++) {
|
|
49
|
+
Object value = jsonArray.get(i);
|
|
50
|
+
if (value instanceof JSONObject) {
|
|
51
|
+
array.pushMap(convertJsonToMap((JSONObject) value));
|
|
52
|
+
} else if (value instanceof JSONArray) {
|
|
53
|
+
array.pushArray(convertJsonToArray((JSONArray) value));
|
|
54
|
+
} else if (value instanceof Boolean) {
|
|
55
|
+
array.pushBoolean((Boolean) value);
|
|
56
|
+
} else if (value instanceof Integer) {
|
|
57
|
+
array.pushInt((Integer) value);
|
|
58
|
+
} else if (value instanceof Double) {
|
|
59
|
+
array.pushDouble((Double) value);
|
|
60
|
+
} else if (value instanceof String) {
|
|
61
|
+
array.pushString((String) value);
|
|
62
|
+
} else {
|
|
63
|
+
array.pushString(value.toString());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return array;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public static JSONObject convertMapToJson(ReadableMap readableMap) throws JSONException {
|
|
70
|
+
JSONObject object = new JSONObject();
|
|
71
|
+
ReadableMapKeySetIterator iterator = readableMap.keySetIterator();
|
|
72
|
+
while (iterator.hasNextKey()) {
|
|
73
|
+
String key = iterator.nextKey();
|
|
74
|
+
switch (readableMap.getType(key)) {
|
|
75
|
+
case Null:
|
|
76
|
+
object.put(key, JSONObject.NULL);
|
|
77
|
+
break;
|
|
78
|
+
case Boolean:
|
|
79
|
+
object.put(key, readableMap.getBoolean(key));
|
|
80
|
+
break;
|
|
81
|
+
case Number:
|
|
82
|
+
object.put(key, readableMap.getDouble(key));
|
|
83
|
+
break;
|
|
84
|
+
case String:
|
|
85
|
+
object.put(key, readableMap.getString(key));
|
|
86
|
+
break;
|
|
87
|
+
case Map:
|
|
88
|
+
object.put(key, convertMapToJson(readableMap.getMap(key)));
|
|
89
|
+
break;
|
|
90
|
+
case Array:
|
|
91
|
+
object.put(key, convertArrayToJson(readableMap.getArray(key)));
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return object;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
public static JSONArray convertArrayToJson(ReadableArray readableArray) throws JSONException {
|
|
99
|
+
JSONArray array = new JSONArray();
|
|
100
|
+
for (int i = 0; i < readableArray.size(); i++) {
|
|
101
|
+
switch (readableArray.getType(i)) {
|
|
102
|
+
case Null:
|
|
103
|
+
break;
|
|
104
|
+
case Boolean:
|
|
105
|
+
array.put(readableArray.getBoolean(i));
|
|
106
|
+
break;
|
|
107
|
+
case Number:
|
|
108
|
+
array.put(readableArray.getDouble(i));
|
|
109
|
+
break;
|
|
110
|
+
case String:
|
|
111
|
+
array.put(readableArray.getString(i));
|
|
112
|
+
break;
|
|
113
|
+
case Map:
|
|
114
|
+
array.put(convertMapToJson(readableArray.getMap(i)));
|
|
115
|
+
break;
|
|
116
|
+
case Array:
|
|
117
|
+
array.put(convertArrayToJson(readableArray.getArray(i)));
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return array;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
package com.accurascankyc;
|
|
2
|
+
|
|
3
|
+
import java.security.cert.CertificateException;
|
|
4
|
+
|
|
5
|
+
import javax.net.ssl.HostnameVerifier;
|
|
6
|
+
import javax.net.ssl.SSLContext;
|
|
7
|
+
import javax.net.ssl.SSLSession;
|
|
8
|
+
import javax.net.ssl.SSLSocketFactory;
|
|
9
|
+
import javax.net.ssl.TrustManager;
|
|
10
|
+
import javax.net.ssl.X509TrustManager;
|
|
11
|
+
|
|
12
|
+
import okhttp3.OkHttpClient;
|
|
13
|
+
|
|
14
|
+
public class UnsafeOkHttpClient {
|
|
15
|
+
public static OkHttpClient getUnsafeOkHttpClient() {
|
|
16
|
+
try {
|
|
17
|
+
// Create a trust manager that does not validate certificate chains
|
|
18
|
+
final TrustManager[] trustAllCerts = new TrustManager[] {
|
|
19
|
+
new X509TrustManager() {
|
|
20
|
+
@Override
|
|
21
|
+
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@Override
|
|
25
|
+
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Override
|
|
29
|
+
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
|
|
30
|
+
return new java.security.cert.X509Certificate[]{};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// Install the all-trusting trust manager
|
|
36
|
+
final SSLContext sslContext = SSLContext.getInstance("SSL");
|
|
37
|
+
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
|
38
|
+
|
|
39
|
+
// Create an ssl socket factory with our all-trusting manager
|
|
40
|
+
final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
|
|
41
|
+
|
|
42
|
+
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
|
43
|
+
builder.sslSocketFactory(sslSocketFactory, (X509TrustManager)trustAllCerts[0]);
|
|
44
|
+
builder.hostnameVerifier(new HostnameVerifier() {
|
|
45
|
+
@Override
|
|
46
|
+
public boolean verify(String hostname, SSLSession session) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
OkHttpClient okHttpClient = builder.build();
|
|
52
|
+
return okHttpClient;
|
|
53
|
+
} catch (Exception e) {
|
|
54
|
+
throw new RuntimeException(e);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:shape="rectangle">
|
|
4
|
+
<solid android:color="#40E1E1E1" />
|
|
5
|
+
<corners android:bottomLeftRadius="10dp" android:bottomRightRadius="@dimen/_10dp" />
|
|
6
|
+
</shape>
|
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<vector android:height="24dp" android:tint="#FFFFFF"
|
|
2
|
+
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
|
3
|
+
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
4
|
+
<path android:fillColor="#FF000000" android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
|
5
|
+
</vector>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
|
|
4
|
+
<solid android:color="@color/red" />
|
|
5
|
+
<padding
|
|
6
|
+
android:bottom="@dimen/fifteen"
|
|
7
|
+
android:left="@dimen/ten"
|
|
8
|
+
android:right="@dimen/ten"
|
|
9
|
+
android:top="@dimen/fifteen" />
|
|
10
|
+
|
|
11
|
+
<corners android:radius="100dp" />
|
|
12
|
+
</shape>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
android:background="@color/white"
|
|
8
|
+
android:orientation="vertical"
|
|
9
|
+
tools:context="com.accurascan.accurasdk.sample.OcrResultActivity">
|
|
10
|
+
|
|
11
|
+
<androidx.constraintlayout.widget.ConstraintLayout
|
|
12
|
+
android:layout_width="match_parent"
|
|
13
|
+
android:layout_height="match_parent"
|
|
14
|
+
tools:context="accura.kyc.plugin.FaceMatchActivity">
|
|
15
|
+
|
|
16
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
17
|
+
|
|
18
|
+
</RelativeLayout>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:layout_width="match_parent"
|
|
4
|
+
android:layout_height="match_parent"
|
|
5
|
+
android:background="@drawable/splash"
|
|
6
|
+
android:gravity="center">
|
|
7
|
+
|
|
8
|
+
<ImageView
|
|
9
|
+
android:id="@+id/iv_logo"
|
|
10
|
+
android:layout_width="wrap_content"
|
|
11
|
+
android:layout_height="wrap_content"
|
|
12
|
+
android:layout_centerInParent="true"
|
|
13
|
+
android:layout_gravity="center"
|
|
14
|
+
android:layout_marginBottom="30dp"
|
|
15
|
+
android:contentDescription="@string/app_name"
|
|
16
|
+
android:src="@mipmap/logo_loign" />
|
|
17
|
+
|
|
18
|
+
<ProgressBar
|
|
19
|
+
android:id="@+id/loader"
|
|
20
|
+
android:layout_width="wrap_content"
|
|
21
|
+
android:layout_height="wrap_content"
|
|
22
|
+
android:layout_below="@+id/iv_logo"
|
|
23
|
+
android:layout_centerInParent="true"
|
|
24
|
+
android:visibility="gone" />
|
|
25
|
+
|
|
26
|
+
</RelativeLayout>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
android:id="@+id/ocr_frame"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
8
|
+
android:visibility="gone">
|
|
9
|
+
|
|
10
|
+
<View
|
|
11
|
+
android:id="@+id/view_left_frame"
|
|
12
|
+
tools:layout_conversion_absoluteHeight="731dp"
|
|
13
|
+
tools:layout_conversion_absoluteWidth="157dp"
|
|
14
|
+
tools:layout_editor_absoluteX="0dp"
|
|
15
|
+
tools:layout_editor_absoluteY="0dp"
|
|
16
|
+
android:layout_width="wrap_content"
|
|
17
|
+
android:layout_height="200dp"
|
|
18
|
+
android:background="@color/trans_black"
|
|
19
|
+
app:layout_constraintEnd_toStartOf="@id/border_frame"
|
|
20
|
+
app:layout_constraintTop_toTopOf="@id/border_frame" />
|
|
21
|
+
|
|
22
|
+
<View
|
|
23
|
+
android:id="@+id/view_right_frame"
|
|
24
|
+
tools:layout_conversion_absoluteHeight="731dp"
|
|
25
|
+
tools:layout_conversion_absoluteWidth="157dp"
|
|
26
|
+
tools:layout_editor_absoluteX="254dp"
|
|
27
|
+
tools:layout_editor_absoluteY="0dp"
|
|
28
|
+
android:layout_width="wrap_content"
|
|
29
|
+
android:layout_height="200dp"
|
|
30
|
+
android:background="@color/trans_black"
|
|
31
|
+
app:layout_constraintStart_toEndOf="@+id/border_frame"
|
|
32
|
+
app:layout_constraintTop_toTopOf="@id/border_frame" />
|
|
33
|
+
|
|
34
|
+
<RelativeLayout
|
|
35
|
+
android:id="@+id/view_top_frame"
|
|
36
|
+
tools:layout_editor_absoluteX="0dp"
|
|
37
|
+
tools:layout_editor_absoluteY="0dp"
|
|
38
|
+
android:layout_width="wrap_content"
|
|
39
|
+
android:layout_height="0dp"
|
|
40
|
+
android:background="@color/trans_black"
|
|
41
|
+
app:layout_constraintBottom_toTopOf="@id/border_frame"
|
|
42
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
43
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
44
|
+
app:layout_constraintTop_toTopOf="parent">
|
|
45
|
+
|
|
46
|
+
<com.accurascankyc.BorderTextView
|
|
47
|
+
android:id="@+id/tv_title"
|
|
48
|
+
android:layout_width="match_parent"
|
|
49
|
+
android:layout_height="wrap_content"
|
|
50
|
+
android:layout_alignParentBottom="true"
|
|
51
|
+
android:layout_marginBottom="8dp"
|
|
52
|
+
android:gravity="center"
|
|
53
|
+
android:text="@string/scan_front"
|
|
54
|
+
android:textColor="@color/white"
|
|
55
|
+
android:textSize="15sp"
|
|
56
|
+
android:textStyle="bold" />
|
|
57
|
+
|
|
58
|
+
</RelativeLayout>
|
|
59
|
+
|
|
60
|
+
<RelativeLayout
|
|
61
|
+
android:id="@+id/view_bottom_frame"
|
|
62
|
+
tools:layout_conversion_absoluteHeight="28dp"
|
|
63
|
+
tools:layout_conversion_absoluteWidth="411dp"
|
|
64
|
+
tools:layout_editor_absoluteX="0dp"
|
|
65
|
+
tools:layout_editor_absoluteY="703dp"
|
|
66
|
+
android:layout_width="match_parent"
|
|
67
|
+
android:layout_height="0dp"
|
|
68
|
+
android:background="@color/trans_black"
|
|
69
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
70
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
71
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
72
|
+
app:layout_constraintTop_toBottomOf="@+id/border_frame">
|
|
73
|
+
|
|
74
|
+
<com.accurascankyc.BorderTextView
|
|
75
|
+
android:id="@+id/tv_scan_msg"
|
|
76
|
+
android:layout_width="match_parent"
|
|
77
|
+
android:layout_height="wrap_content"
|
|
78
|
+
android:layout_marginTop="8dp"
|
|
79
|
+
android:gravity="center"
|
|
80
|
+
android:textColor="@color/white"
|
|
81
|
+
android:textSize="15sp"
|
|
82
|
+
android:textStyle="bold" />
|
|
83
|
+
|
|
84
|
+
</RelativeLayout>
|
|
85
|
+
|
|
86
|
+
<RelativeLayout
|
|
87
|
+
android:id="@+id/border_frame"
|
|
88
|
+
tools:layout_conversion_absoluteHeight="300dp"
|
|
89
|
+
tools:layout_conversion_absoluteWidth="98dp"
|
|
90
|
+
tools:layout_editor_absoluteX="157dp"
|
|
91
|
+
tools:layout_editor_absoluteY="216dp"
|
|
92
|
+
android:layout_width="match_parent"
|
|
93
|
+
android:layout_height="200dp"
|
|
94
|
+
android:layout_margin="10dp"
|
|
95
|
+
android:background="@drawable/border_red"
|
|
96
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
97
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
98
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
99
|
+
app:layout_constraintTop_toTopOf="parent">
|
|
100
|
+
|
|
101
|
+
<ImageView
|
|
102
|
+
android:id="@+id/im_flip_image"
|
|
103
|
+
android:layout_width="100dp"
|
|
104
|
+
android:layout_height="wrap_content"
|
|
105
|
+
android:layout_centerInParent="true"
|
|
106
|
+
android:contentDescription="@string/app_name"
|
|
107
|
+
android:src="@drawable/flip"
|
|
108
|
+
android:visibility="gone" />
|
|
109
|
+
|
|
110
|
+
<LinearLayout
|
|
111
|
+
android:layout_width="wrap_content"
|
|
112
|
+
android:layout_height="wrap_content"
|
|
113
|
+
android:orientation="vertical"
|
|
114
|
+
android:layout_marginEnd="4dp"
|
|
115
|
+
android:layout_marginBottom="4dp"
|
|
116
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
117
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
118
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
119
|
+
android:layout_alignParentEnd="true"
|
|
120
|
+
android:layout_alignParentBottom="true">
|
|
121
|
+
|
|
122
|
+
<com.accurascan.ocr.mrz.customview.CustomTextView
|
|
123
|
+
android:layout_width="wrap_content"
|
|
124
|
+
android:layout_height="wrap_content"
|
|
125
|
+
android:text=""
|
|
126
|
+
android:textColor="#DDDDDD"
|
|
127
|
+
android:layout_gravity="right"
|
|
128
|
+
android:layout_marginEnd="1dp"
|
|
129
|
+
android:layout_marginBottom="-1dp"
|
|
130
|
+
android:textSize="8sp"
|
|
131
|
+
app:typeface="ALLER_STD_REG"/>
|
|
132
|
+
|
|
133
|
+
<ImageView
|
|
134
|
+
android:id="@+id/imageLOGO"
|
|
135
|
+
android:layout_width="70dp"
|
|
136
|
+
android:layout_height="15dp"
|
|
137
|
+
android:src="@drawable/accura_logo"
|
|
138
|
+
/>
|
|
139
|
+
</LinearLayout>
|
|
140
|
+
|
|
141
|
+
</RelativeLayout>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:layout_width="match_parent"
|
|
4
|
+
android:layout_height="match_parent"
|
|
5
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
6
|
+
android:orientation="vertical">
|
|
7
|
+
|
|
8
|
+
<RelativeLayout
|
|
9
|
+
android:id="@+id/ocr_root"
|
|
10
|
+
android:layout_width="match_parent"
|
|
11
|
+
android:layout_height="match_parent"
|
|
12
|
+
android:orientation="vertical">
|
|
13
|
+
|
|
14
|
+
</RelativeLayout>
|
|
15
|
+
|
|
16
|
+
<include layout="@layout/custom_frame_layout" />
|
|
17
|
+
<ImageView
|
|
18
|
+
android:id="@+id/btn_flip"
|
|
19
|
+
android:layout_width="50dp"
|
|
20
|
+
android:layout_height="50dp"
|
|
21
|
+
android:padding="@dimen/_5dp"
|
|
22
|
+
android:layout_alignParentEnd="true"
|
|
23
|
+
android:layout_margin="@dimen/_20dp"
|
|
24
|
+
android:contentDescription="Flip camera"
|
|
25
|
+
android:text="flip"
|
|
26
|
+
android:src="@drawable/flip_camera_icon"/>
|
|
27
|
+
|
|
28
|
+
</RelativeLayout>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
android:id="@+id/ocr_frame"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
8
|
+
android:visibility="gone">
|
|
9
|
+
|
|
10
|
+
<View
|
|
11
|
+
android:id="@+id/view_left_frame"
|
|
12
|
+
tools:layout_conversion_absoluteHeight="731dp"
|
|
13
|
+
tools:layout_conversion_absoluteWidth="157dp"
|
|
14
|
+
tools:layout_editor_absoluteX="0dp"
|
|
15
|
+
tools:layout_editor_absoluteY="0dp"
|
|
16
|
+
android:layout_width="wrap_content"
|
|
17
|
+
android:layout_height="400dp"
|
|
18
|
+
android:background="@color/trans_black"
|
|
19
|
+
app:layout_constraintEnd_toStartOf="@id/border_frame"
|
|
20
|
+
app:layout_constraintTop_toTopOf="@id/border_frame" />
|
|
21
|
+
|
|
22
|
+
<View
|
|
23
|
+
android:id="@+id/view_right_frame"
|
|
24
|
+
tools:layout_conversion_absoluteHeight="731dp"
|
|
25
|
+
tools:layout_conversion_absoluteWidth="157dp"
|
|
26
|
+
tools:layout_editor_absoluteX="254dp"
|
|
27
|
+
tools:layout_editor_absoluteY="0dp"
|
|
28
|
+
android:layout_width="wrap_content"
|
|
29
|
+
android:layout_height="400dp"
|
|
30
|
+
android:background="@color/trans_black"
|
|
31
|
+
app:layout_constraintStart_toEndOf="@+id/border_frame"
|
|
32
|
+
app:layout_constraintTop_toTopOf="@id/border_frame" />
|
|
33
|
+
|
|
34
|
+
<RelativeLayout
|
|
35
|
+
android:id="@+id/view_top_frame"
|
|
36
|
+
tools:layout_editor_absoluteX="0dp"
|
|
37
|
+
tools:layout_editor_absoluteY="0dp"
|
|
38
|
+
android:layout_width="wrap_content"
|
|
39
|
+
android:layout_height="0dp"
|
|
40
|
+
android:background="@color/trans_black"
|
|
41
|
+
app:layout_constraintBottom_toTopOf="@id/border_frame"
|
|
42
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
43
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
44
|
+
app:layout_constraintTop_toTopOf="parent">
|
|
45
|
+
|
|
46
|
+
<com.accurascankyc.BorderTextView
|
|
47
|
+
android:id="@+id/tv_title"
|
|
48
|
+
android:layout_width="match_parent"
|
|
49
|
+
android:layout_height="wrap_content"
|
|
50
|
+
android:layout_alignParentBottom="true"
|
|
51
|
+
android:layout_marginBottom="8dp"
|
|
52
|
+
android:gravity="center"
|
|
53
|
+
android:text="@string/scan_front"
|
|
54
|
+
android:textColor="@color/white"
|
|
55
|
+
android:textSize="15sp"
|
|
56
|
+
android:textStyle="bold" />
|
|
57
|
+
|
|
58
|
+
</RelativeLayout>
|
|
59
|
+
|
|
60
|
+
<RelativeLayout
|
|
61
|
+
android:id="@+id/view_bottom_frame"
|
|
62
|
+
tools:layout_conversion_absoluteHeight="28dp"
|
|
63
|
+
tools:layout_conversion_absoluteWidth="411dp"
|
|
64
|
+
tools:layout_editor_absoluteX="0dp"
|
|
65
|
+
tools:layout_editor_absoluteY="703dp"
|
|
66
|
+
android:layout_width="match_parent"
|
|
67
|
+
android:layout_height="0dp"
|
|
68
|
+
android:background="@color/trans_black"
|
|
69
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
70
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
71
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
72
|
+
app:layout_constraintTop_toBottomOf="@+id/border_frame">
|
|
73
|
+
|
|
74
|
+
<com.accurascankyc.BorderTextView
|
|
75
|
+
android:id="@+id/tv_scan_msg"
|
|
76
|
+
android:layout_width="match_parent"
|
|
77
|
+
android:layout_height="wrap_content"
|
|
78
|
+
android:layout_marginTop="8dp"
|
|
79
|
+
android:gravity="center"
|
|
80
|
+
android:textColor="@color/white"
|
|
81
|
+
android:textSize="15sp"
|
|
82
|
+
android:textStyle="bold" />
|
|
83
|
+
|
|
84
|
+
</RelativeLayout>
|
|
85
|
+
|
|
86
|
+
<RelativeLayout
|
|
87
|
+
android:id="@+id/border_frame"
|
|
88
|
+
tools:layout_conversion_absoluteHeight="300dp"
|
|
89
|
+
tools:layout_conversion_absoluteWidth="98dp"
|
|
90
|
+
tools:layout_editor_absoluteX="157dp"
|
|
91
|
+
tools:layout_editor_absoluteY="216dp"
|
|
92
|
+
android:layout_width="match_parent"
|
|
93
|
+
android:layout_height="400dp"
|
|
94
|
+
android:layout_margin="10dp"
|
|
95
|
+
android:background="@drawable/border_red"
|
|
96
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
97
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
98
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
99
|
+
app:layout_constraintTop_toTopOf="parent">
|
|
100
|
+
|
|
101
|
+
<ImageView
|
|
102
|
+
android:id="@+id/im_flip_image"
|
|
103
|
+
android:layout_width="100dp"
|
|
104
|
+
android:layout_height="wrap_content"
|
|
105
|
+
android:layout_centerInParent="true"
|
|
106
|
+
android:contentDescription="@string/app_name"
|
|
107
|
+
android:src="@drawable/flip"
|
|
108
|
+
android:visibility="gone" />
|
|
109
|
+
|
|
110
|
+
<LinearLayout
|
|
111
|
+
android:layout_width="wrap_content"
|
|
112
|
+
android:layout_height="wrap_content"
|
|
113
|
+
android:orientation="vertical"
|
|
114
|
+
android:layout_marginEnd="4dp"
|
|
115
|
+
android:layout_marginBottom="4dp"
|
|
116
|
+
app:layout_constraintBottom_toBottomOf="parent"
|
|
117
|
+
app:layout_constraintLeft_toLeftOf="parent"
|
|
118
|
+
app:layout_constraintRight_toRightOf="parent"
|
|
119
|
+
android:layout_alignParentEnd="true"
|
|
120
|
+
android:layout_alignParentBottom="true">
|
|
121
|
+
|
|
122
|
+
<com.accurascan.ocr.mrz.customview.CustomTextView
|
|
123
|
+
android:layout_width="wrap_content"
|
|
124
|
+
android:layout_height="wrap_content"
|
|
125
|
+
android:text=""
|
|
126
|
+
android:textColor="#DDDDDD"
|
|
127
|
+
android:layout_gravity="right"
|
|
128
|
+
android:layout_marginEnd="1dp"
|
|
129
|
+
android:layout_marginBottom="-1dp"
|
|
130
|
+
android:textSize="8sp"
|
|
131
|
+
app:typeface="ALLER_STD_REG"/>
|
|
132
|
+
|
|
133
|
+
<ImageView
|
|
134
|
+
android:id="@+id/imageLOGO"
|
|
135
|
+
android:layout_width="70dp"
|
|
136
|
+
android:layout_height="15dp"
|
|
137
|
+
android:src="@drawable/accura_logo"
|
|
138
|
+
/>
|
|
139
|
+
</LinearLayout>
|
|
140
|
+
|
|
141
|
+
</RelativeLayout>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:layout_width="match_parent"
|
|
4
|
+
android:layout_height="match_parent"
|
|
5
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
6
|
+
android:orientation="vertical">
|
|
7
|
+
|
|
8
|
+
<RelativeLayout
|
|
9
|
+
android:id="@+id/ocr_root"
|
|
10
|
+
android:layout_width="match_parent"
|
|
11
|
+
android:layout_height="match_parent"
|
|
12
|
+
android:orientation="vertical">
|
|
13
|
+
|
|
14
|
+
</RelativeLayout>
|
|
15
|
+
|
|
16
|
+
<include layout="@layout/custom_frame_layout" />
|
|
17
|
+
<ImageView
|
|
18
|
+
android:id="@+id/btn_flip"
|
|
19
|
+
android:layout_width="50dp"
|
|
20
|
+
android:layout_height="50dp"
|
|
21
|
+
android:padding="@dimen/_5dp"
|
|
22
|
+
android:layout_alignParentEnd="true"
|
|
23
|
+
android:layout_margin="@dimen/_20dp"
|
|
24
|
+
android:contentDescription="Flip camera"
|
|
25
|
+
android:text="flip"
|
|
26
|
+
android:src="@drawable/flip_camera_icon"/>
|
|
27
|
+
|
|
28
|
+
<ImageView
|
|
29
|
+
android:id="@+id/select_type"
|
|
30
|
+
android:layout_width="45dp"
|
|
31
|
+
android:layout_height="45dp"
|
|
32
|
+
android:padding="@dimen/_5dp"
|
|
33
|
+
android:layout_alignParentEnd="true"
|
|
34
|
+
android:layout_margin="@dimen/_20dp"
|
|
35
|
+
android:contentDescription="Flip camera"
|
|
36
|
+
android:layout_alignParentBottom="true"
|
|
37
|
+
android:text="flip"
|
|
38
|
+
android:src="@drawable/ic_barcode"
|
|
39
|
+
android:visibility="gone"/>
|
|
40
|
+
|
|
41
|
+
</RelativeLayout>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
4
|
+
<item android:id="@+id/item_land_port"
|
|
5
|
+
android:title="landscape"
|
|
6
|
+
app:showAsAction="ifRoom" />
|
|
7
|
+
</menu>
|