马上连需求更改4
This commit is contained in:
parent
4ba0f48d00
commit
40481a94c4
|
|
@ -28,9 +28,6 @@
|
|||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||
<!-- 适配Android 14以上 google 上架需要注意相关政策 -->
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission
|
||||
android:name="android.permission.QUERY_ALL_PACKAGES"
|
||||
tools:ignore="QueryAllPackagesPermission" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
<application
|
||||
|
|
|
|||
|
|
@ -66,10 +66,12 @@ import com.yingmao.clash.net.http.entity.StartingBeans
|
|||
import com.yingmao.clash.util.AESUtil
|
||||
import com.yingmao.clash.util.Utils
|
||||
import com.yingmao.clash.view.RxToast
|
||||
import com.yingmao.clash.view.dialog.ActivityLinkDialog
|
||||
import com.yingmao.clash.view.dialog.DialogAgreementPrivacyChoose
|
||||
import com.yingmao.clash.view.dialog.DialogAppVersion
|
||||
import com.yingmao.clash.view.dialog.DialogDoMainChoose
|
||||
import com.yingmao.clash.view.dialog.RxDialogSureCancel
|
||||
import com.yingmao.clash.view.dialog.SplashDialog
|
||||
import com.yingmao.clash.vm.SplashAtyVM
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -539,9 +541,28 @@ class SplashActivity : BaseActivity() {
|
|||
but_register?.visibility = View.INVISIBLE
|
||||
splashAtyVM.checkLogin()
|
||||
} else {
|
||||
// doRegister()
|
||||
if (isNeedRegister) {
|
||||
doRegisterByEncryption()
|
||||
val decodeBool =
|
||||
MMKV.defaultMMKV().decodeBool(BZYConstants.is_splash_first, false)
|
||||
if(!decodeBool){
|
||||
val splashDialog =
|
||||
SplashDialog(this)
|
||||
splashDialog.showDialog(this@SplashActivity)
|
||||
splashDialog.setOnDialogClickListener(object :SplashDialog.ActivityLinkListener{
|
||||
override fun onFinishClickListener() {
|
||||
doRegisterByEncryption()
|
||||
MMKV.defaultMMKV().encode(BZYConstants.is_splash_first, true)
|
||||
}
|
||||
override fun onCancelClickListener() {
|
||||
MMKV.defaultMMKV().encode(BZYConstants.is_splash_first, false)
|
||||
finish()
|
||||
}
|
||||
|
||||
})
|
||||
}else{
|
||||
doRegisterByEncryption()
|
||||
}
|
||||
|
||||
} else {
|
||||
setWebView()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,5 +119,6 @@ class BZYConstants {
|
|||
const val languageInfo = "languageInfo"
|
||||
const val applicationMode = "ApplicationMode"
|
||||
const val CONNECTID = "connectId"
|
||||
const val is_splash_first = "is_splash_first"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.yingmao.clash.view.dialog;
|
||||
|
||||
import static androidx.core.content.ContextCompat.startActivity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yingmao.clash.R;
|
||||
import com.yingmao.clash.act.AgreementAndPrivacyActivity;
|
||||
import com.yingmao.clash.conf.BZYConstants;
|
||||
import com.yingmao.clash.net.http.entity.Activity_;
|
||||
|
||||
public class SplashDialog extends Dialog {
|
||||
|
||||
public SplashDialog(Context context) {
|
||||
super(context);
|
||||
setContentView(R.layout.splash_dialog_layout);
|
||||
//设置点击布局外则Dialog消失
|
||||
setCanceledOnTouchOutside(false);
|
||||
}
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void showDialog(Context context) {
|
||||
Window window = getWindow();
|
||||
//设置弹窗动画
|
||||
assert window != null;
|
||||
window.setWindowAnimations(R.style.style_dialog);
|
||||
//设置Dialog背景色
|
||||
window.setBackgroundDrawableResource(R.color.colorTransparent);
|
||||
WindowManager.LayoutParams wl = window.getAttributes();
|
||||
//设置弹窗位置
|
||||
wl.gravity = Gravity.CENTER;
|
||||
window.setAttributes(wl);
|
||||
show();
|
||||
TextView tvYszc=findViewById(R.id.tvYszc);
|
||||
TextView tvYHYy=findViewById(R.id.tvYHYy);
|
||||
TextView noAgree=findViewById(R.id.tv_pay_cancle);
|
||||
TextView agree=findViewById(R.id.tv_pay_finish);
|
||||
|
||||
tvYszc.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent =new Intent(context, AgreementAndPrivacyActivity.class);
|
||||
intent.putExtra(
|
||||
BZYConstants.EXTRA_KEY_AGREEMENT,
|
||||
BZYConstants.EXTRA_PRIVACY_AGREEMENT);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
tvYHYy.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent =new Intent(context, AgreementAndPrivacyActivity.class);
|
||||
intent.putExtra(
|
||||
BZYConstants.EXTRA_KEY_AGREEMENT,
|
||||
BZYConstants.EXTRA_USER_AGREEMENT
|
||||
);
|
||||
context.startActivity(intent);
|
||||
|
||||
}
|
||||
});
|
||||
noAgree.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(activityLinkListener!=null){
|
||||
activityLinkListener.onCancelClickListener();
|
||||
}
|
||||
}
|
||||
});
|
||||
agree.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(activityLinkListener!=null){
|
||||
activityLinkListener.onFinishClickListener();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
/********************** 回调 ************************/
|
||||
private ActivityLinkListener activityLinkListener;
|
||||
|
||||
public void setOnDialogClickListener(ActivityLinkListener activityLinkListener){
|
||||
this.activityLinkListener = activityLinkListener;
|
||||
}
|
||||
|
||||
public interface ActivityLinkListener{
|
||||
void onFinishClickListener();
|
||||
void onCancelClickListener();
|
||||
}
|
||||
}
|
||||
|
|
@ -291,7 +291,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
android:paddingRight="30dp"
|
||||
android:paddingLeft="30dp"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@color/translate"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:background="@color/colorTransparent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/activity_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="10dp"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/act_dia_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#4F4F4F"
|
||||
android:text="@string/sptips"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="21dp"
|
||||
android:layout_marginEnd="21dp"
|
||||
android:layout_marginTop="8dp"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/tvYszc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/PrivacyPolicyEd"
|
||||
android:textColor="@color/color_clash"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvYHYy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ServiceTermsEd"
|
||||
android:textColor="@color/color_clash"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tvYszc"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay_cancle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/activity_close_bg"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="@string/close"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:textColor="@color/blue_4072FE" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pay_finish"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/activity_jump_bg"
|
||||
android:textColor="@color/white"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="@string/agree"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -356,4 +356,7 @@ Service Description\n
|
|||
<string name="skip">Go to login</string>
|
||||
<string name="email_or_phone_register">Email registration</string>
|
||||
<string name="CZHY">Recharge Membership</string>
|
||||
<string name="ServiceTermsEd">《ServiceTerms》</string>
|
||||
<string name="PrivacyPolicyEd">《PrivacyPolicy》</string>
|
||||
<string name="sptips">In order to implement and strengthen awareness of personal information security protection, please read the relevant agreements listed below carefully.</string>
|
||||
</resources>
|
||||
|
|
@ -347,4 +347,7 @@
|
|||
<string name="email_or_phone_register">手動注册</string>
|
||||
|
||||
<string name="CZHY">充值會員</string>
|
||||
<string name="ServiceTermsEd">《服務條款》</string>
|
||||
<string name="PrivacyPolicyEd">《隱私政策》</string>
|
||||
<string name="sptips">為貫徹與加強個人信息安全防護意識,請仔細閱讀以下列出的相關協議</string>
|
||||
</resources>
|
||||
|
|
@ -345,4 +345,7 @@
|
|||
<string name="app_name_yunti">雲梯加速器</string>
|
||||
<string name="email_or_phone_register">手動注册</string>
|
||||
<string name="CZHY">充值會員</string>
|
||||
<string name="ServiceTermsEd">《服務條款》</string>
|
||||
<string name="PrivacyPolicyEd">《隱私政策》</string>
|
||||
<string name="sptips">為貫徹與加強個人信息安全防護意識,請仔細閱讀以下列出的相關協議</string>
|
||||
</resources>
|
||||
|
|
@ -380,4 +380,7 @@
|
|||
<string name="changeLocation">变更国家/地区</string>
|
||||
<string name="anqpro">安全模式</string>
|
||||
<string name="jsmpri">极速模式</string>
|
||||
<string name="ServiceTermsEd">《服务条款》</string>
|
||||
<string name="PrivacyPolicyEd">《隐私政策》</string>
|
||||
<string name="sptips">为贯彻与加强个人信息安全防护意识,请仔细阅读以下列出的相关协议</string>
|
||||
</resources>
|
||||
|
|
@ -100,7 +100,7 @@ subprojects {
|
|||
}
|
||||
productFlavors {
|
||||
flavorDimensions("feature")
|
||||
create("12395") {
|
||||
create("9788") {
|
||||
isDefault = true
|
||||
dimension = flavorDimensionList[0]
|
||||
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
|
||||
|
|
@ -111,7 +111,7 @@ subprojects {
|
|||
buildConfigField("String", "applicationId", "\"com.jsq.mashanglian\"")
|
||||
buildConfigField("String", "service_url", "\"https://api.wfvpnpro.com/\"")
|
||||
buildConfigField("boolean", "is_free", "false")
|
||||
buildConfigField("String", "productId", "\"12395\"")
|
||||
buildConfigField("String", "productId", "\"9788\"")
|
||||
manifestPlaceholders(
|
||||
mapOf(
|
||||
"APP_NAME" to "@string/ConnectImmediately",
|
||||
|
|
@ -121,7 +121,7 @@ subprojects {
|
|||
}
|
||||
}
|
||||
sourceSets {
|
||||
getByName("12395") {
|
||||
getByName("9788") {
|
||||
java.srcDirs("src/foss/java")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue