Skip to content

Commit 4e9dd3e

Browse files
committed
Added the approve assets for no connection page
1 parent bd4e5e9 commit 4e9dd3e

File tree

10 files changed

+67
-103
lines changed

10 files changed

+67
-103
lines changed

java-demo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ android {
77

88
defaultConfig {
99
applicationId "com.example.java_demo"
10-
minSdkVersion 21
10+
minSdkVersion 23
1111
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"

thepeer-android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<application>
99
<activity
10-
android:name=".ui.activity.ThepeerSDKActivity"
10+
android:name=".ui.activity.ThepeerSdkActivity"
1111
android:theme="@style/ThepeerSDKTheme"
1212
android:screenOrientation="portrait"
1313
/>

thepeer-android/src/main/java/co/thepeer/sdk/ui/ThepeerResultContract.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import android.content.Intent
66
import androidx.activity.result.contract.ActivityResultContract
77
import co.thepeer.sdk.model.ThepeerParam
88
import co.thepeer.sdk.model.ThepeerResult
9-
import co.thepeer.sdk.ui.activity.ThepeerSDKActivity
9+
import co.thepeer.sdk.ui.activity.ThepeerSdkActivity
1010
import co.thepeer.sdk.utils.ThepeerConstants
1111

1212
internal class ThepeerResultContract : ActivityResultContract<ThepeerParam, ThepeerResult>() {
1313
override fun createIntent(context: Context, input: ThepeerParam): Intent {
14-
return Intent(context, ThepeerSDKActivity::class.java).apply {
14+
return Intent(context, ThepeerSdkActivity::class.java).apply {
1515
putExtra(ThepeerConstants.THE_PEER_PARAMS, input)
1616
}
1717
}

thepeer-android/src/main/java/co/thepeer/sdk/ui/activity/ThepeerSDKActivity.kt renamed to thepeer-android/src/main/java/co/thepeer/sdk/ui/activity/ThepeerSdkActivity.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ import co.thepeer.sdk.R
1616
import co.thepeer.sdk.databinding.SdkActivityBinding
1717
import co.thepeer.sdk.model.ThepeerParam
1818
import co.thepeer.sdk.model.ThepeerResult
19-
import co.thepeer.sdk.ui.fragments.ThepeerFragment
2019
import co.thepeer.sdk.utils.*
2120
import co.thepeer.sdk.utils.Logger
2221
import co.thepeer.sdk.utils.Urls
2322
import co.thepeer.sdk.utils.WebInterface
2423

25-
class ThepeerSDKActivity : AppCompatActivity() {
24+
internal class ThepeerSdkActivity : AppCompatActivity() {
2625
private var params: ThepeerParam? = null
2726
private var url: String = ""
2827
private lateinit var binding: SdkActivityBinding
@@ -53,6 +52,9 @@ class ThepeerSDKActivity : AppCompatActivity() {
5352
Logger.log(this, url)
5453
}
5554

55+
binding.includeRetryView.closeBtn.setOnClickListener {
56+
finish()
57+
}
5658
}
5759

5860
@SuppressLint("SetJavaScriptEnabled")

thepeer-android/src/main/java/co/thepeer/sdk/ui/fragments/ThepeerFragment.kt

Lines changed: 0 additions & 88 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package co.thepeer.sdk.utils
22

3-
enum class Environment(val url: String) {
3+
internal enum class Environment(val url: String) {
44
PROD(""),
55
TEST("")
66
}

thepeer-android/src/main/java/co/thepeer/sdk/utils/ThepeerConstants.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package co.thepeer.sdk.utils
22

3-
class ThepeerConstants {
3+
internal class ThepeerConstants {
44
companion object {
55
const val THE_PEER_PARAMS = "peer_params"
66
const val SEND = "send"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="40dp"
3+
android:height="40dp"
4+
android:viewportWidth="40"
5+
android:viewportHeight="40">
6+
<path
7+
android:pathData="M20,20m-20,0a20,20 0,1 1,40 0a20,20 0,1 1,-40 0"
8+
android:fillColor="#F7F7FC"/>
9+
<path
10+
android:pathData="M25.884,15.884L21.767,20L25.884,24.116C26.003,24.232 26.098,24.369 26.164,24.522C26.229,24.674 26.264,24.838 26.265,25.004C26.267,25.17 26.235,25.335 26.172,25.489C26.109,25.642 26.017,25.782 25.899,25.899C25.782,26.017 25.642,26.109 25.489,26.172C25.335,26.235 25.17,26.267 25.004,26.265C24.838,26.264 24.674,26.229 24.522,26.164C24.369,26.098 24.232,26.003 24.116,25.884L20,21.767L15.884,25.884C15.768,26.003 15.63,26.098 15.478,26.164C15.325,26.229 15.161,26.264 14.995,26.265C14.83,26.267 14.665,26.235 14.511,26.172C14.358,26.109 14.218,26.017 14.101,25.899C13.983,25.782 13.891,25.642 13.828,25.489C13.765,25.335 13.733,25.17 13.735,25.004C13.736,24.838 13.771,24.674 13.836,24.522C13.902,24.369 13.997,24.232 14.116,24.116L18.233,20L14.116,15.884C13.997,15.768 13.902,15.63 13.836,15.478C13.771,15.325 13.736,15.161 13.735,14.995C13.733,14.83 13.765,14.665 13.828,14.511C13.891,14.358 13.983,14.218 14.101,14.101C14.218,13.983 14.358,13.891 14.511,13.828C14.665,13.765 14.83,13.733 14.995,13.735C15.161,13.736 15.325,13.771 15.478,13.836C15.63,13.902 15.768,13.997 15.884,14.116L20,18.233L24.116,14.116C24.232,13.997 24.369,13.902 24.522,13.836C24.674,13.771 24.838,13.736 25.004,13.735C25.17,13.733 25.335,13.765 25.489,13.828C25.642,13.891 25.782,13.983 25.899,14.101C26.017,14.218 26.109,14.358 26.172,14.511C26.235,14.665 26.267,14.83 26.265,14.995C26.264,15.161 26.229,15.325 26.164,15.478C26.098,15.63 26.003,15.768 25.884,15.884Z"
11+
android:fillColor="#586283"/>
12+
</vector>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="40dp"
3+
android:height="35dp"
4+
android:viewportWidth="40"
5+
android:viewportHeight="35">
6+
<path
7+
android:pathData="M20,2L2,33.091H38L20,2Z"
8+
android:strokeLineJoin="round"
9+
android:strokeWidth="3.27273"
10+
android:fillColor="#00000000"
11+
android:strokeColor="#FFB400"/>
12+
<path
13+
android:pathData="M20,26.545V27.364M20,13.455L20.007,21.636"
14+
android:strokeWidth="3.27273"
15+
android:fillColor="#00000000"
16+
android:strokeColor="#FFB400"
17+
android:strokeLineCap="round"/>
18+
</vector>
Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
4-
android:id="@+id/retry_view"
54
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/retry_view"
6+
android:background="@color/unclearWhite"
67
android:layout_width="match_parent"
78
android:layout_height="match_parent">
89

9-
<Button
10+
<TextView
1011
android:id="@+id/retry_button"
1112
android:layout_width="wrap_content"
1213
android:layout_height="wrap_content"
13-
android:layout_marginTop="16dp"
14+
android:layout_marginTop="24dp"
1415
android:text="@string/retry"
15-
android:background="@color/colorPrimary"
16-
android:textColor="@color/unclearWhite"
16+
android:textColor="@color/colorPrimary"
1717
app:layout_constraintEnd_toEndOf="@+id/textView"
1818
app:layout_constraintStart_toStartOf="@+id/textView"
1919
app:layout_constraintTop_toBottomOf="@+id/textView" />
@@ -22,13 +22,33 @@
2222
android:id="@+id/textView"
2323
android:layout_width="wrap_content"
2424
android:layout_height="wrap_content"
25-
android:layout_marginStart="24dp"
26-
android:layout_marginEnd="24dp"
2725
android:text="@string/retry_text"
2826
app:layout_constraintBottom_toBottomOf="parent"
2927
app:layout_constraintEnd_toEndOf="parent"
3028
app:layout_constraintStart_toStartOf="parent"
3129
app:layout_constraintTop_toTopOf="parent"
3230
app:layout_constraintVertical_bias="0.5" />
3331

32+
<ImageView
33+
android:id="@+id/close_btn"
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:layout_marginTop="24dp"
37+
android:layout_marginEnd="24dp"
38+
app:layout_constraintEnd_toEndOf="parent"
39+
app:layout_constraintTop_toTopOf="parent"
40+
app:srcCompat="@drawable/close_icon" />
41+
42+
<ImageView
43+
android:id="@+id/imageView2"
44+
android:layout_width="80dp"
45+
android:layout_height="80dp"
46+
android:layout_marginBottom="16dp"
47+
android:scaleType="fitCenter"
48+
app:layout_constraintBottom_toTopOf="@+id/textView"
49+
app:layout_constraintEnd_toEndOf="parent"
50+
app:layout_constraintHorizontal_bias="0.498"
51+
app:layout_constraintStart_toStartOf="parent"
52+
app:srcCompat="@drawable/warning" />
53+
3454
</androidx.constraintlayout.widget.ConstraintLayout>

0 commit comments

Comments
 (0)