This commit is contained in:
2024-10-16 00:03:41 +08:00
commit 897058435c
5033 changed files with 1009728 additions and 0 deletions

View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,31 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 30
// buildToolsVersion '30.0.2'
lintOptions {
abortOnError false
}
defaultConfig {
minSdkVersion 17
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26+'
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 77ba741b8b6dabd45aba959b0b64136b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 48f329a73a9b9634b800079d6fcb58f0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 24be87a28a4a76448afcca071012a357
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f3bedba5fb3617a48ab3a3493157ab63
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.foldcc.agreement_library"
xmlns:tools="http://schemas.android.com/tools">
<application
android:usesCleartextTraffic="true"
>
<!-- android:networkSecurityConfig="@xml/network_security_config"-->
<!-- tools:replace="android:networkSecurityConfig"-->
<meta-data
android:name="USER_AGREEMENT"
android:value="https://foldcc.cn/service.htm" />
<meta-data
android:name="PRIVACY_AGREEMENT"
android:value="https://foldcc.cn/privacy.htm" />
<meta-data
android:name="START_ACTIVITY"
android:value="com.unity3d.player.UnityPlayerActivity" />
<!--<meta-data-->
<!--android:name="AGREEMENT_STYLE_TYPE"-->
<!--android:value="drak" />-->
<activity
android:name="com.foldcc.agreement_library.AgreementDialogActivity"
android:launchMode="singleTop"
android:exported="true"/>
<!-- android:theme="@style/TransLateTheme"-->
<activity
android:name="com.foldcc.agreement_library.WebViewActivity"
android:launchMode="singleTop"
android:theme="@style/TransLateTheme"
android:exported="true"
/>
</application>
</manifest>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a6e6a19be47d09047a356277f6cd67be
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8063c5394cea47649881155d35fe9806
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 56156854daf5c3940b7dcd1c3ed85a1c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 326f0473cc261bc46b3bd0c700f46a6b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f41ec7d439485cd4b96dbd6642519be0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,192 @@
package com.foldcc.agreement_library;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class AgreementDialogActivity extends Activity {
private TextView mTvContent, mTvTips;
private ImageView mTipsImage;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
int layoutId = R.layout.activity_agreement_dialog;
// if (getMetaData("AGREEMENT_STYLE_TYPE").equals("drak")){
// layoutId = R.layout.activity_agreement_dialog_new;
// }
setContentView(layoutId);
mTvTips = findViewById(R.id.agreement_dialog_agreement_tips);
mTipsImage = findViewById(R.id.agreement_dialog_agreement_tips_img);
if (mTvTips != null) {
mTvTips.setHighlightColor(getResources().getColor(android.R.color.transparent));
mTvTips.setMovementMethod(LinkMovementMethod.getInstance());
mTvTips.setText(getAgreementTipsContent());
}
SharedPreferencesHelper.init(this, "mineF");
if (SharedPreferencesHelper.getInt("agreement", 0) != 1) {
mTvContent = findViewById(R.id.agreement_dialog_content);
initRichText();
} else {
openActivity();
finish();
}
}
private SpannableStringBuilder getAgreementTipsContent() {
String text1 = "我已同意并知晓";
final String text2 = getString(R.string.ServiceAgreementTips);
String text3 = getString(R.string.And);
final String text4 = getString(R.string.PrivacyPolicyTips);
String content = text1 + text2 + text3 + text4;
SpannableStringBuilder spannableString = new SpannableStringBuilder(content);
spannableString.setSpan(new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
checkClick(view);
}
@Override
public void updateDrawState(@NonNull TextPaint ds) {
super.updateDrawState(ds);
ds.setUnderlineText(false);
ds.setColor(getResources().getColor(R.color.agreementContentAndTitleColor));
}
}, 0, text1.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
spannableString.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.agreementBtnColor)), text1.length(), text1.length() + text2.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
spannableString.setSpan(new AgreementClick(true), text1.length(), text1.length() + text2.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
spannableString.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.agreementBtnColor)), text1.length() + text2.length() + text3.length(), text1.length() + text2.length() + text3.length() + text4.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
spannableString.setSpan(new AgreementClick(false), text1.length() + text2.length() + text3.length(), text1.length() + text2.length() + text3.length() + text4.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
return spannableString;
}
public void onRightBtnClick(View view) {
if (!isCheck){
Toast.makeText(this,getResources().getString(R.string.PleaseAgreeAgreement),Toast.LENGTH_SHORT).show();
return;
}
SharedPreferencesHelper.applyInt("agreement", 1);
openActivity();
finishCurActivity();
}
private void openActivity() {
try {
Class activity = getClassLoader().loadClass(getMetaData("START_ACTIVITY"));
Intent intent = new Intent(this, activity);
startActivity(intent);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
private void finishCurActivity() {
finish();
// this.overridePendingTransition(R.anim.dialog_scal_out, 0);
}
public void onLeftBtnClick(View view) {
System.exit(0);
}
private boolean isCheck = false;
public void checkClick(View view) {
isCheck = !isCheck;
int imgId = R.drawable.ic_select_n;
if (isCheck) {
imgId = R.drawable.ic_select_s;
} else {
imgId = R.drawable.ic_select_n;
}
mTipsImage.setImageResource(imgId);
}
public static void open(Activity activity) {
activity.startActivity(new Intent(activity, AgreementDialogActivity.class));
// activity.overridePendingTransition(R.anim.dialog_scal_in, R.anim.dialog_scal_out);
}
/**
* 初始化富文本
*/
private void initRichText() {
String text1 = "请务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包含但不限于:\n为了向你提供游戏内容、数据统计等服务我们需要搜集你的设备信息(操作系统、soc性能等)、操作日志(每局游戏统计数据等)等个人信息。你可阅读";
final String text3 = getString(R.string.ServiceAgreementTips);
String text4 = getString(R.string.And);
final String text5 = getString(R.string.PrivacyPolicyTips);
String text6 = getString(R.string.ServiceAgreementAndPrivacyPolicyConten02);
String content = text1 + text3 + text4 + text5 + text6;
SpannableStringBuilder stringBuilder = new SpannableStringBuilder(content);
stringBuilder.setSpan(new AgreementClick(true), text1.length(), (text1 + text3).length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
stringBuilder.setSpan(new AgreementClick(false), (text1 + text3 + text4).length(), (text1 + text3 + text4 + text5).length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
if (mTvContent != null) {
mTvContent.setHighlightColor(getResources().getColor(android.R.color.transparent));
mTvContent.setMovementMethod(LinkMovementMethod.getInstance());
mTvContent.setText(stringBuilder);
}
}
private class AgreementClick extends ClickableSpan {
boolean isUserAgreement = true;
public AgreementClick(boolean isUserAgreement) {
this.isUserAgreement = isUserAgreement;
}
@Override
public void onClick(@NonNull View widget) {
//用户协议点击
String title = getString(R.string.ServiceAgreementTips);
String urlTag = getMetaData("USER_AGREEMENT");
if (!isUserAgreement) {
title = getString(R.string.PrivacyPolicyTips);
urlTag = getMetaData("PRIVACY_AGREEMENT");
}
WebViewActivity.open(AgreementDialogActivity.this, title, urlTag);
}
@Override
public void updateDrawState(@NonNull TextPaint ds) {
super.updateDrawState(ds);
ds.setUnderlineText(false);
ds.setColor(getResources().getColor(R.color.agreementBtnColor));
}
}
private String getMetaData(String metaName) {
ApplicationInfo appInfo = null;
String data = null;
try {
appInfo = AgreementDialogActivity.this.getPackageManager()
.getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
data = appInfo.metaData.getString(metaName);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return data;
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d88d0e512c96a4d47b04800e55fc38c7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
package com.foldcc.agreement_library;
import android.app.Activity;
import com.foldcc.agreement_library.AgreementDialogActivity;
import com.foldcc.agreement_library.SharedPreferencesHelper;
public class AgreementTools {
public void init(Activity unityActivity) {
AgreementDialogActivity.open(unityActivity);
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b9c1b497f45b6cc43ab0e736abaac2f6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,244 @@
package com.foldcc.agreement_library;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Log;
import java.util.Set;
public class SharedPreferencesHelper {
private static final String TAG = SharedPreferencesHelper.class.getSimpleName();
private static SharedPreferences mSharedPreferences = null;
/**
* 初始化
*
* @param applicationContext
* @param spName
*/
public static void init(Context applicationContext, String spName) {
if (TextUtils.isEmpty(spName)) {
throw new NullPointerException("When SharedPreferencesHelper init, SharedPreferences name is null!");
}
if (applicationContext == null) {
throw new NullPointerException("When SharedPreferencesHelper init, applicationContext is null!");
}
mSharedPreferences = applicationContext.getSharedPreferences(spName, Context.MODE_PRIVATE);
}
/**
* 删除key
*
* @param key The name of the preference to remove.
*/
public static void removeKey(String key) {
if (mSharedPreferences != null) {
SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.remove(key);
editor.apply();
} else {
Log.e(TAG, "mSharedPreferences is null");
}
}
public static void clear() {
if (mSharedPreferences != null) {
SharedPreferences.Editor editor = mSharedPreferences.edit();
editor.clear();
editor.apply();
} else {
Log.e(TAG, "mSharedPreferences is null");
}
}
public static void applyInt(String key, int value) {
applyKeyValue(key, value);
}
public static void applyLong(String key, long value) {
applyKeyValue(key, value);
}
public static void applyFloat(String key, float value) {
applyKeyValue(key, value);
}
public static void applyBoolean(String key, boolean value) {
applyKeyValue(key, value);
}
public static void applyString(String key, String value) {
if (null == value) {//防止传入null时无法判断存储类型
applyKeyValue(key, "");
return;
}
applyKeyValue(key, value);
}
public static void applyStringSet(String key, Set<String> defValue) {
if (mSharedPreferences != null && null == defValue) {//防止传入null时无法判断存储类型
mSharedPreferences.edit().putStringSet(key, null).apply();
}
commitKeyValue(key, defValue);
}
public static boolean commitInt(String key, int value) {
return commitKeyValue(key, value);
}
public static boolean commitLong(String key, long value) {
return commitKeyValue(key, value);
}
public static boolean commitFloat(String key, float value) {
return commitKeyValue(key, value);
}
public static boolean commitBoolean(String key, boolean value) {
return commitKeyValue(key, value);
}
public static boolean commitString(String key, String value) {
if (null == value) {//防止传入null时无法判断存储类型
return commitKeyValue(key, "");
}
return commitKeyValue(key, value);
}
public static boolean commitStringSet(String key, Set<String> defValue) {
if (mSharedPreferences != null && null == defValue) {//防止传入null时无法判断存储类型
return mSharedPreferences.edit().putStringSet(key, null).commit();
}
return commitKeyValue(key, defValue);
}
public static int getInt(String key, int defValue) {
return (int) getValue(key, defValue);
}
public static long getLong(String key, long defValue) {
return (long) getValue(key, defValue);
}
public static float getFloat(String key, float defValue) {
return (float) getValue(key, defValue);
}
public static boolean getBoolean(String key, boolean defValue) {
return (boolean) getValue(key, defValue);
}
public static String getString(String key, String defValue) {
if (null == defValue) {//防止传入null时无法判断存储类型
return (String) getValue(key, "");
}
return (String) getValue(key, defValue);
}
public static Set<String> getStringSet(String key, Set<String> defValue) {
if (mSharedPreferences != null && null == defValue) {//防止传入null时无法判断存储类型
return mSharedPreferences.getStringSet(key, null);
}
return (Set<String>) getValue(key, defValue);
}
/**
* 异步提交保存
* 注不提供该方法给外部是因为传入的是Object类型表意不够明确使用易误导。
*
* @param key
* @param value
* @return
*/
private static void applyKeyValue(String key, Object value) {
if (mSharedPreferences == null) {
Log.e(TAG, "mSharedPreferences is null");
return;
}
SharedPreferences.Editor editor = setEditor(key, value);
editor.apply();
}
/**
* 立即提交保存,立即生效,立即返回保存到磁盘的成功与否
* 注不提供该方法给外部是因为传入的是Object类型表意不够明确使用易误导。
*
* @param key
* @param value
* @return
*/
private static boolean commitKeyValue(String key, Object value) {
if (mSharedPreferences == null) {
Log.e(TAG, "mSharedPreferences is null");
return false;
}
SharedPreferences.Editor editor = setEditor(key, value);
return editor.commit();
}
/**
* 统一保存处理
*
* @param key
* @param value
* @return
*/
private static SharedPreferences.Editor setEditor(String key, Object value) {
SharedPreferences.Editor editor = mSharedPreferences.edit();
if (value instanceof String) {
editor.putString(key, (String) value);
} else if (value instanceof Integer) {
editor.putInt(key, (Integer) value);
} else if (value instanceof Long) {
editor.putLong(key, (Long) value);
} else if (value instanceof Float) {
editor.putFloat(key, (Float) value);
} else if (value instanceof Boolean) {
editor.putBoolean(key, (Boolean) value);
} else if (value instanceof Set) {
editor.putStringSet(key, (Set<String>) value);
}
return editor;
}
/**
* 统一获取处理
*
* @param key
* @param defValue
* @return
*/
private static Object getValue(String key, Object defValue) {
if (mSharedPreferences == null) {
Log.e(TAG, "mSharedPreferences is null");
return defValue;
}
if (defValue instanceof String) {
return mSharedPreferences.getString(key, (String) defValue);
} else if (defValue instanceof Integer) {
return mSharedPreferences.getInt(key, (Integer) defValue);
} else if (defValue instanceof Long) {
return mSharedPreferences.getLong(key, (Long) defValue);
} else if (defValue instanceof Float) {
return mSharedPreferences.getFloat(key, (Float) defValue);
} else if (defValue instanceof Boolean) {
return mSharedPreferences.getBoolean(key, (Boolean) defValue);
} else if (defValue instanceof Set) {
return mSharedPreferences.getStringSet(key, (Set<String>) defValue);
}
return defValue;
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1f57b3cd65cd65042ad84965c4bd0c32
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,145 @@
package com.foldcc.agreement_library;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.Nullable;
public class WebViewActivity extends Activity {
private TextView mTitleTv;
private WebView mWebView;
private ProgressBar mProgressBar;
private String url;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
mTitleTv = findViewById(R.id.web_view_title);
mWebView = findViewById(R.id.web_view);
mProgressBar = findViewById(R.id.web_view_progress_bar);
url = getIntent().getStringExtra("url");
String title = getIntent().getStringExtra("title");
initWebView();
if (title != null && !title.equals("")) {
if (mTitleTv != null) {
mTitleTv.setText(title);
}
if (mTitleTv != null) {
mTitleTv.setVisibility(View.VISIBLE);
}
} else {
if (mTitleTv != null) {
mTitleTv.setVisibility(View.GONE);
}
}
}
public void onCancel(View view) {
finish();
}
public static void open(Activity activity, String title, String agremmentUrl) {
Intent intent = new Intent(activity, WebViewActivity.class);
intent.putExtra("title", title);
intent.putExtra("url", agremmentUrl);
activity.startActivity(intent);
}
@SuppressLint("JavascriptInterface")
private void initWebView() {
if (mWebView != null) {
mWebView.loadUrl(url);
mWebView.addJavascriptInterface(this, "android");
mWebView.setWebChromeClient(webChromeClient);
mWebView.setWebViewClient(webViewClient);
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(false);
}
}
private WebViewClient webViewClient = new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
if (mProgressBar != null) {
mProgressBar.setVisibility(View.GONE);
}
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {//页面开始加载
if (mProgressBar != null) {
mProgressBar.setVisibility(View.VISIBLE);
}
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return super.shouldOverrideUrlLoading(view, url);
}
};
private WebChromeClient webChromeClient = new WebChromeClient() {
@Override
public void onReceivedTitle(WebView view, String title) {
super.onReceivedTitle(view, title);
if (title != null && !title.equals("")) {
if (mTitleTv != null) {
mTitleTv.setText(title);
}
if (mTitleTv != null) {
mTitleTv.setVisibility(View.VISIBLE);
}
} else {
if (mTitleTv != null) {
mTitleTv.setVisibility(View.GONE);
}
}
}
@Override
public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
if (mProgressBar != null) {
mProgressBar.setProgress(newProgress);
}
}
};
@Override
protected void onDestroy() {
super.onDestroy();
if (mWebView != null) {
mWebView.destroy();
mWebView = null;
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (mWebView != null) {
if (mWebView.canGoBack() && keyCode == KeyEvent.KEYCODE_BACK) {//点击返回按钮的时候判断有没有上一页
mWebView.goBack(); // goBack()表示返回webView的上一页面
return true;
}
}
return super.onKeyDown(keyCode, event);
}
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1a80d74d75150764b94e886b93472f25
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 174e1e070b05c244981b6b4839d6dd8a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c0742a3d673839b4bae764bc4c257527
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:fillEnabled="true" >
<scale
android:duration="250"
android:fromXScale="1.5"
android:fromYScale="1.5"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1.0"
android:toYScale="1.0" >
</scale>
<alpha
android:duration="250"
android:fromAlpha="0"
android:interpolator="@android:anim/decelerate_interpolator"
android:toAlpha="1.0" />
</set>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ac8a773da0b584c41b7950b738cecd04
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:fillEnabled="true" >
<scale
android:duration="250"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1.5"
android:toYScale="1.5" >
</scale>
<alpha
android:duration="250"
android:fromAlpha="1.0"
android:interpolator="@android:anim/decelerate_interpolator"
android:toAlpha="0.0" />
</set>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9667ed3482b5eb84fb77231e7c1e5fc2
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 67931f7bcf77cb74cb0b73b06fc2abe3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="5dp"/>
<solid android:color="@color/agreementDialogForegroundColor"/>
</shape>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4e070340c769eb74e83cf1fca3f2cf83
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="5dp"/>
<solid android:color="@color/agreementDialogForegroundColorDark"/>
</shape>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b0ed29ff6dd8fe140b2847cb44d67dd0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/agreementSplitLine"/>
<corners android:radius="5dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 398bed2947fbd224d949bb24a936f90e
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/agreementSplitLineDark"/>
<corners android:radius="5dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 113cf7ccd3b8d4b43b17fe4553773d7b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/agreementBtnColor"/>
<corners android:radius="5dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dcffc5bbdac56bc4e91d641e2df0e392
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/agreementBtnColorDark"/>
<corners android:radius="5dp"/>
</shape>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e453474d908281549b9dd8986b4ac3e1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3c879f4582a75174396444543da2cbbd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bef4890d832214d4a89f8b41c3842078
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<color android:color="@android:color/transparent" />
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="@color/agreementBtnColor" />
</shape>
</clip>
</item>
</layer-list>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fd870269e9ff76649a6bd63dc2677db9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1c6155b054b69214697a68cbfc610a1e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/agreementDialogBgColor"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="50dp"
android:background="@drawable/agreement_dialog_bg"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="15dp"
android:paddingRight="10dp"
android:paddingBottom="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ServiceAgreementAndPrivacyPolicy"
android:textColor="@color/agreementContentAndTitleColor"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@color/agreementDialogContentBgColor"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/agreement_dialog_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/agreementContentAndTitleColor"
android:textSize="12sp" />
<LinearLayout
android:onClick="checkClick"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/agreement_dialog_agreement_tips_img"
android:layout_marginTop="2dp"
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/ic_select_n" />
<TextView
android:textStyle="bold"
android:layout_marginStart="5dp"
android:id="@+id/agreement_dialog_agreement_tips"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/agreementContentAndTitleColor"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/agreement_dialog_left_btn_bg"
android:onClick="onLeftBtnClick"
android:text="@string/NotUsedTemporarily"
android:textColor="@color/agreementBtnTextColor"
android:textSize="12sp" />
<View
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="0.5" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/agreement_dialog_right_btn_bg"
android:onClick="onRightBtnClick"
android:text="@string/Agree"
android:textColor="@color/agreementBtnTextColor"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0110f5119cff25246af961ab45c7355f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/agreementDialogBgColor"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_margin="50dp"
android:background="@drawable/agreement_dialog_bg_drak"
android:gravity="center"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingTop="15dp"
android:paddingRight="10dp"
android:paddingBottom="15dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/ServiceAgreementAndPrivacyPolicy"
android:textColor="@color/agreementContentAndTitleColorDark"
android:textSize="12sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@color/agreementDialogContentBgColorDark"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/agreement_dialog_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/agreementContentAndTitleColorDark"
android:textSize="12sp" />
<LinearLayout
android:onClick="checkClick"
android:layout_marginTop="5dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/agreement_dialog_agreement_tips_img"
android:layout_marginTop="2dp"
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/ic_select_n" />
<TextView
android:textStyle="bold"
android:layout_marginStart="5dp"
android:id="@+id/agreement_dialog_agreement_tips"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/agreementContentAndTitleColorDark"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/agreement_dialog_left_btn_bg_drak"
android:onClick="onLeftBtnClick"
android:text="@string/NotUsedTemporarily"
android:textColor="@color/agreementBtnTextColorDark"
android:textSize="12sp" />
<View
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_weight="0.5" />
<Button
style="?android:attr/borderlessButtonStyle"
android:layout_width="0dp"
android:layout_height="35dp"
android:layout_weight="1"
android:background="@drawable/agreement_dialog_right_btn_bg_drak"
android:onClick="onRightBtnClick"
android:text="@string/Agree"
android:textColor="@color/agreementBtnTextColorDark"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 69bedcd1f6b1e634d8f347c16ad56c09
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/webViewBgColor"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="49dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:onClick="onCancel"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:text="@string/Cancel"
android:textColor="@color/agreementBtnColor"
android:textSize="17sp" />
<TextView
android:visibility="gone"
android:id="@+id/web_view_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="@color/agreementContentAndTitleColor"
android:textSize="17sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:alpha="0.2"
android:background="@color/agreementSplitLine" />
<ProgressBar
android:id="@+id/web_view_progress_bar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="2dp"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/web_progress_drawable"
android:visibility="gone" />
<WebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"></WebView>
</LinearLayout>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 80939f89013771f48978da94d53d90bd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0761601d71bda4e46a8964f34fd57eb6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--标题和内容颜色-->
<color name="agreementContentAndTitleColor">#1D1D1D</color>
<!--隐私协议弹窗内容背景-->
<color name="agreementDialogContentBgColor">#FFFFFF</color>
<!--所以可以点击的颜色-->
<color name="agreementBtnColor">#F78B28</color>
<color name="agreementClickTextColor">#F78B28</color>
<!--隐私协议内容标题栏分割线颜色-->
<color name="agreementSplitLine">#9f9f9f</color>
<color name="agreementDialogBgColor">#2F2F2F</color>
<!--弹窗前景色-->
<color name="agreementDialogForegroundColor">#ffffffff</color>
<color name="agreementBtnTextColor">#ffffff</color>
<!--隐私协议内容背景-->
<color name="webViewBgColor">#ffffff</color>
<!--drak-->
<!--标题和内容颜色-->
<color name="agreementContentAndTitleColorDark">#E6E6E6</color>
<!--隐私协议弹窗内容背景-->
<color name="agreementDialogContentBgColorDark">#2E2E2E</color>
<!--所以可以点击的颜色-->
<color name="agreementClickTextColorDark">#F78B28</color>
<color name="agreementBtnColorDark">#2E2E2E</color>
<!--隐私协议内容标题栏分割线颜色-->
<color name="agreementSplitLineDark">#504F4F</color>
<color name="agreementDialogBgColorDark">#2F2F2F</color>
<!--弹窗前景色-->
<color name="agreementDialogForegroundColorDark">#494646</color>
<color name="agreementBtnTextColorDark">#DCDCDC</color>
<!--隐私协议内容背景-->
<color name="webViewBgColorDark">#FFFFFF</color>
</resources>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4cf8b77a456ebd64784999f5c453e656
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 038bfd2a647a4244f954d63d9c707d29
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
<resources>
<string name="ServiceAgreementAndPrivacyPolicy">服务协议和隐私政策</string>
<string name="NotUsedTemporarily">暂不使用</string>
<string name="Agree">同意</string>
<string name="ServiceAgreementTips">《服务协议》</string>
<string name="And"></string>
<string name="PrivacyPolicyTips">《隐私政策》</string>
<string name="ServiceAgreementAndPrivacyPolicyConten02">了解详细信息。如你同意,请点击“同意”开始接受我们的服务。</string>
<string name="Cancel">取消</string>
<string name="PleaseAgreeAgreement">请阅读并勾选服务协议和隐私政策</string>
</resources>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: c0f3d06a9024aab44a8f4f0b90cc39e0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,20 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="colorPrimaryDark">@android:color/black</item>
<item name="colorAccent">@android:color/black</item>
</style>
<style name="TransLateTheme" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
</style>
</resources>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3e2081ec13095fd44bce1475e6c56c22
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f5294ee5081d5cc4f93faa180c9ab185
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
<paths>
<!-- 这个下载路径也不可以修改必须为GDTDOWNLOAD -->
<external-cache-path
name="gdt_sdk_download_path1"
path="com_qq_e_download" />
<cache-path
name="gdt_sdk_download_path2"
path="com_qq_e_download" />
</paths>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0113966f726be48419ff1bbed44cbd32
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b9c0358af9a946e41859e3eb51912ecd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: