finish part of authorize logic and retrofit add function

This commit is contained in:
unknown
2020-03-26 18:23:16 +08:00
parent df3d31b9b6
commit 207f7eb771
27 changed files with 386 additions and 146 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:radius="@dimen/dp_59" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
</shape>
</item>
<item>
<shape>
<corners android:radius="@dimen/dp_59" />
<gradient android:endColor="#5CC1FF" android:startColor="#3E7FFC" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_22" />
<gradient
android:endColor="#3F4057"
android:startColor="#50526E " />
</shape>

View File

@@ -5,6 +5,93 @@
android:layout_height="match_parent"
android:background="#000000">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clLoadingContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_330"
android:layout_marginTop="@dimen/dp_90"
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:background="@drawable/module_authorize_selector_dark_corner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/ivAuthorizeLoading"
android:layout_width="@dimen/dp_147"
android:layout_height="@dimen/dp_147"
android:layout_marginTop="@dimen/dp_335"
android:src="@mipmap/module_authorize_loading"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvAuthorizeLoading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_44"
android:text="@string/module_authorize_agreement_loading"
android:textColor="#99FFFFFF"
android:textSize="@dimen/dp_44"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivAuthorizeLoading" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clLoadingErrorContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_330"
android:layout_marginTop="@dimen/dp_90"
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:background="@drawable/module_authorize_selector_dark_corner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/ivAuthorizeLoadingError"
android:layout_width="@dimen/dp_147"
android:layout_height="@dimen/dp_147"
android:layout_marginTop="@dimen/dp_254"
android:src="@mipmap/module_authorize_loading_error"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvAuthorizeLoadingError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_33"
android:text="@string/module_authorize_agreement_error"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_44"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivAuthorizeLoadingError" />
<Button
android:id="@+id/btnAuthorizeLoadingError"
android:layout_width="@dimen/dp_461"
android:layout_height="@dimen/dp_97"
android:layout_marginTop="@dimen/dp_33"
android:text="@string/module_authorize_agreement_retry"
android:textColor="@android:color/white"
android:gravity="center"
android:background="@drawable/module_authorize_selector_blue_corner"
android:textSize="@dimen/dp_44"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAuthorizeLoadingError" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clAuthorizeContainer"
android:layout_width="match_parent"
@@ -14,7 +101,7 @@
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:background="@drawable/module_authorize_shape_drak_top_corner"
android:visibility="visible"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -47,7 +134,6 @@
android:layout_width="0px"
android:layout_height="0px"
android:layout_marginBottom="@dimen/dp_160"
android:fillViewport="true"
android:scrollbarSize="@dimen/dp_11"
android:scrollbarThumbVertical="@drawable/module_authorize_scrollbar"
app:layout_constraintBottom_toBottomOf="parent"
@@ -63,17 +149,21 @@
<TextView
android:id="@+id/tvAuthorizeContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_44" />
<TextView
android:id="@+id/tvAuthorizeButtonContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/tvAuthorizeLastContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:textColor="@android:color/white" />
</LinearLayout>
</ScrollView>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -2,4 +2,7 @@
<string name="app_name">mogo-module-authorize</string>
<string name="module_authorize_agreement_agree">同意</string>
<string name="module_authorize_agreement_disagree">不同意</string>
<string name="module_authorize_agreement_loading">正在加载,请稍等...</string>
<string name="module_authorize_agreement_error">加载失败</string>
<string name="module_authorize_agreement_retry">点击重试</string>
</resources>