刷脸认证成功页面本地化
This commit is contained in:
parent
d78ec09c04
commit
7a02706b75
@ -167,6 +167,9 @@
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.AddCarSuccActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.auth.FaceSuccActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.arpa.hndahesudintocctmsdriver.ui.login.LoginActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
|
@ -45,6 +45,7 @@ import com.arpa.hndahesudintocctmsdriver.request.UserRequset;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.UiAuxiliary;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.CertificatesActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.auth.FaceSuccActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.home.StartYunDanActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
@ -100,13 +101,13 @@ public class H5Activity extends AppCompatActivity {
|
||||
WebSettings webSetting = mWebView.getSettings();
|
||||
|
||||
String title = getIntent().getStringExtra("title");
|
||||
if (!TextUtils.isEmpty(title)){
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
tvTitle.setText(title);
|
||||
}
|
||||
|
||||
back.setOnClickListener(v -> {
|
||||
if (isOk){
|
||||
ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
if (isOk) {
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
return;
|
||||
}
|
||||
if (mWebView.canGoBack()) {
|
||||
@ -117,8 +118,8 @@ public class H5Activity extends AppCompatActivity {
|
||||
});
|
||||
|
||||
close.setOnClickListener(v -> {
|
||||
if (isOk){
|
||||
ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
if (isOk) {
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
return;
|
||||
}
|
||||
if (mWebView.canGoBack()) {
|
||||
@ -224,13 +225,22 @@ public class H5Activity extends AppCompatActivity {
|
||||
String url = intent.getStringExtra("url");
|
||||
viewFile = intent.getBooleanExtra("view_file", false);
|
||||
if (url.startsWith("alipay")) {
|
||||
|
||||
try {
|
||||
Intent intent2 = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
intent2.putExtra("isGoCar",isGoCar);
|
||||
startActivity(intent2);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}else if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) {
|
||||
Intent in = new Intent(ctx, FaceSuccActivity.class);
|
||||
startActivity(in);
|
||||
if (isGoCar) {
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
}else{
|
||||
finish();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (curUrl == null) {
|
||||
curUrl = url;
|
||||
@ -250,17 +260,29 @@ public class H5Activity extends AppCompatActivity {
|
||||
Uri uri = Uri.parse(url);
|
||||
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
|
||||
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
|
||||
if (isGoCar&&url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")){
|
||||
isOk = true;
|
||||
view.loadUrl(url);
|
||||
new MessageUtils().showSimCenPop(ctx, "个人信息上传成功,请添加车辆信息!", "去添加",() -> {
|
||||
Intent in = new Intent(ctx, CertificatesActivity.class);
|
||||
in.putExtra("index", 2);
|
||||
startActivity(in);
|
||||
ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
});
|
||||
if (url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")) {
|
||||
Intent in = new Intent(ctx, FaceSuccActivity.class);
|
||||
in.putExtra("isGoCar",isGoCar);
|
||||
startActivity(in);
|
||||
if (isGoCar) {
|
||||
ActivityUtils.finishToActivity(MainActivity.class, false);
|
||||
}else{
|
||||
finish();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// if (isGoCar&&url.startsWith("https://agreement.dahehuoyun.com/#/1ba5c216/912f4c9587/5eb5184653/6ef9")){
|
||||
// isOk = true;
|
||||
// view.loadUrl(url);
|
||||
// new MessageUtils().showSimCenPop(ctx, "个人信息上传成功,请添加车辆信息!", "去添加",() -> {
|
||||
// Intent in = new Intent(ctx, CertificatesActivity.class);
|
||||
// in.putExtra("index", 2);
|
||||
// startActivity(in);
|
||||
// ActivityUtils.finishToActivity(MainActivity.class,false);
|
||||
// });
|
||||
// return true;
|
||||
// }
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
} else if (uri.getScheme().equals("js") || uri.getScheme().equals("jsbridge")) {
|
||||
|
@ -1,12 +1,17 @@
|
||||
package com.arpa.hndahesudintocctmsdriver.ui.auth;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.arpa.hndahesudintocctmsdriver.R;
|
||||
import com.arpa.hndahesudintocctmsdriver.ui.MainActivity;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.statusbar.StateStyleUtil;
|
||||
import com.arpa.hndahesudintocctmsdriver.util.view.BaseAppCompatActivity;
|
||||
import com.dahe.mylibrary.utils.ActivityUtils;
|
||||
|
||||
/**
|
||||
* @ClassName FaceSuccActivity
|
||||
@ -20,6 +25,26 @@ public class FaceSuccActivity extends BaseAppCompatActivity {
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
StateStyleUtil.stateTextColor(this);
|
||||
setContentView(R.layout.activity_auth_qualification);
|
||||
setContentView(R.layout.activity_face_succ_result);
|
||||
con = this;
|
||||
initView(null);
|
||||
Button btnHome = findViewById(R.id.btnHome);
|
||||
Button btnAddCar = findViewById(R.id.btnAddCar);
|
||||
boolean isGoCar = getIntent().getBooleanExtra("isGoCar", false);
|
||||
if (isGoCar){
|
||||
btnHome.setText("返回");
|
||||
btnAddCar.setVisibility(View.GONE);
|
||||
}else{
|
||||
btnHome.setText("返回首页");
|
||||
btnAddCar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
btnHome.setOnClickListener(v -> finish());
|
||||
btnAddCar.setOnClickListener(v -> {
|
||||
Intent in = new Intent(con, CertificatesActivity.class);
|
||||
in.putExtra("index", 2);
|
||||
startActivity(in);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-xxhdpi/face_success.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/face_success.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
13
app/src/main/res/drawable/bg_btn_deepgreen16.xml
Normal file
13
app/src/main/res/drawable/bg_btn_deepgreen16.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="0" android:useLevel="true"
|
||||
android:startColor="#0b64f6 " android:endColor="#5cb3fd"
|
||||
android:centerX="0" android:centerY="0"
|
||||
android:gradientRadius="@dimen/dp_63" />
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
</shape>
|
||||
|
||||
</item>
|
||||
</selector>
|
9
app/src/main/res/drawable/bg_btn_green16.xml
Normal file
9
app/src/main/res/drawable/bg_btn_green16.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#E1ECFF" />
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
72
app/src/main/res/layout/activity_face_succ_result.xml
Normal file
72
app/src/main/res/layout/activity_face_succ_result.xml
Normal file
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
tools:context=".ui.auth.CertificatesActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/return_btn"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_31"
|
||||
android:layout_marginLeft="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_58"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/return_lefts" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/face_success"></ImageView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/img"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="恭喜您! 实名认证成功"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tvTitle"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnHome"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:background="@drawable/bg_btn_green16"
|
||||
android:text="返回首页"
|
||||
android:textColor="#0966FF" />
|
||||
|
||||
<Button
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:id="@+id/btnAddCar"
|
||||
android:textColor="@color/white"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:background="@drawable/bg_btn_deepgreen16"
|
||||
android:text="添加车辆" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user