1:羽声新版本

This commit is contained in:
2025-10-24 17:55:15 +08:00
parent a809b02ebb
commit 529aae1fcf
821 changed files with 29411 additions and 0 deletions

BIN
app/my-release-key.jks Normal file

Binary file not shown.

View File

@@ -0,0 +1,37 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.qxcm.qxlive",
"variantName": "releasRelease",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0.0.0",
"outputFile": "羽声_1.0.0.0_1.apk"
}
],
"elementType": "File",
"baselineProfiles": [
{
"minApi": 28,
"maxApi": 30,
"baselineProfiles": [
"baselineProfiles/1/羽声_1.0.0.0_1.dm"
]
},
{
"minApi": 31,
"maxApi": 2147483647,
"baselineProfiles": [
"baselineProfiles/0/羽声_1.0.0.0_1.dm"
]
}
],
"minSdkVersionForDexing": 24
}

View File

@@ -0,0 +1,103 @@
package com.qxcm.qxlive;
import com.alibaba.android.arouter.launcher.ARouter;
import com.hjq.toast.ToastUtils;
import com.xscm.moduleutil.base.CommonAppContext;
/**
* Created by cxf on 2017/8/3.
*/
public class AppContext extends CommonAppContext {
private boolean mBeautyInited;
@Override
public void onCreate() {
super.onCreate();
ToastUtils.init(this);
ARouter.init(this);
/* mqttClient = MyMQTTClient.getInstance(this);
mqttClient.initialize("tcp://81.70.45.221:1883");
new Thread(() -> {
boolean connected = mqttClient.connect();
runOnUiThread(() -> {
if (connected) {
} else {
com.blankj.utilcode.util.ToastUtils.showShort("MQTT连接失败");
}
});
}).start();*/
// ToastUtils.setInterceptor(new IToastInterceptor() {
// @Override
// public boolean intercept(CharSequence charSequence) {
// return !CommonAppContext.getInstance().isFront();
// }
// });
// L.setDeBug(BuildConfig.DEBUG);
}
public static void initSdk() {
// CommonAppContext context = CommonAppContext.getInstance();
// if (BuildConfig.DEBUG) {
// L.e("应用签名:" + context.getAppSignature());
// //L.e("facebook散列秘钥------>" + context.getFacebookHashKey());
// }
// //腾讯云直播鉴权url
// String liveLicenceUrl = "https://license.vod2.myqcloud.com/license/v2/1346816652_1/v_cube.license";
// //腾讯云直播鉴权key
// String liveKey = "c30f209835056ba00f738a014ca4448a";
// //腾讯云视频鉴权url
// String ugcLicenceUrl = "https://license.vod2.myqcloud.com/license/v2/1346816652_1/v_cube.license";
// //腾讯云视频鉴权key
// String ugcKey = "c30f209835056ba00f738a014ca4448a";
// TXLiveBase.getInstance().setDebug(BuildConfig.DEBUG);
// TXLiveBase.getInstance().setLicence(context, liveLicenceUrl, liveKey, ugcLicenceUrl, ugcKey);
// //初始化腾讯bugly
// CrashReport.initCrashReport(context);
// CrashReport.setAppVersion(context, CommonAppConfig.getInstance().getVersion());
// //初始化ShareSdk
// MobSDK.init(context);
// MobSDK.submitPolicyGrantResult(true);
// //初始化IM
// ImMessageUtil.getInstance().init();
// //初始化腾讯TPNS 移动推送
// TpnsUtil.register(BuildConfig.DEBUG);
// //初始化友盟统计
// UmengUtil.init(context, BuildConfig.DEBUG);
// //OpenInstall
// OpenInstall.init(context);
}
/**
* 初始化美狐
*/
public void initBeautySdk(String beautyAppId, String beautyKey) {
// if (!TextUtils.isEmpty(beautyAppId) && !TextUtils.isEmpty(beautyKey)) {
// if (!mBeautyInited) {
// mBeautyInited = true;
// if (CommonAppConfig.isYunBaoApp()) {
// beautyAppId = DecryptUtil.decrypt(beautyAppId);
// beautyKey = DecryptUtil.decrypt(beautyKey);
// }
// MHSDK.init(this, beautyAppId, beautyKey);
// CommonAppConfig.getInstance().setMhBeautyEnable(true);
// L.e("美狐初始化----AppId--->" + beautyAppId + "---AppKey--->" + beautyKey);
// }
// } else {
// CommonAppConfig.getInstance().setMhBeautyEnable(false);
// }
}
@Override
public void startInitSdk() {
initSdk();
}
}

View File

@@ -0,0 +1,20 @@
package com.xscm.midi;
import android.app.Activity;
import com.xscm.moduleutil.activity.IPresenter;
import com.xscm.moduleutil.activity.IView;
public final class LaunchContacter {
public interface View extends IView<Activity> {
}
public interface ILoginPre extends IPresenter {
void oauthLogin(String login_token);
void address_ip(String address_ip);
}
}

View File

@@ -0,0 +1,191 @@
package com.qxcm.qxlive;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.PersistableBundle;
import android.util.Log;
import androidx.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.qxcm.qxlive.databinding.ActivityLaunchPageBinding;
import com.xscm.modulelogin.activity.ImproveInfoActivity;
import com.xscm.moduleutil.activity.BaseAppCompatActivity;
import com.xscm.moduleutil.activity.WebViewActivity;
import com.xscm.moduleutil.base.AppStateListener;
import com.xscm.moduleutil.base.AppStateManager;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.dialog.PolicyDialog;
import com.xscm.moduleutil.utils.ARouteConstants;
import com.xscm.moduleutil.utils.SpUtil;
/**
APP准备启动
*
* _oo0oo_
* o8888888o
* 88" . "88
* (| -_- |)
* 0\ = /0
* ___/`---'\___
* .' \\| |// '.
* / \\||| : |||// \
* / _||||| -卍-|||||- \
* | | \\\ - /// | |
* | \_| ''\---/'' |_/ |
* \ .-\__ '-' ___/-. /
* ___'. .' /--.--\ `. .'___
* ."" '< `.___\_<|>_/___.' >' "".
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
* \ \ `_. \_ __\ /__ _/ .-` / /
*=====`-.____`.___ \_____/___.-`___.-'=====
* `=---='
*
* 佛祖保佑 永无BUG
* 佛曰:
* 写字楼里写字间,写字间里程序员;
* 程序人员写程序,又拿程序换酒钱。
* 酒醒只在网上坐,酒醉还来网下眠;
* 酒醉酒醒日复日,网上网下年复年。
* 但愿老死电脑间,不愿鞠躬老板前;
* 奔驰宝马贵者趣,公交自行程序员。
* 别人笑我忒疯癫,我笑自己命太贱;
* 不见满街漂亮妹,哪个归得程序员?
*/
public class LaunchPageActivity extends BaseAppCompatActivity<ActivityLaunchPageBinding> {
private Handler handler;
private PolicyDialog policyDialog;
private AppStateListener appStateListener;
@Override
public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
super.onCreate(savedInstanceState, persistentState);
// 获取Application实例并设置监听器
CommonAppContext app = (CommonAppContext) getApplication();
appStateListener = AppStateManager.getInstance();
app.setAppStateListener(appStateListener);
if (!isTaskRoot()) {
if (SpUtil.getUnderagePassword() != null && !SpUtil.getUnderagePassword().isEmpty()) {
// ARouter.getInstance().build(ARouteConstants.H5).withString("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken())
// .withString("type", "1").navigation();//type==1青少年模式
Intent intent = new Intent(this, WebViewActivity.class);
intent.putExtra("url", CommonAppContext.getInstance().getCurrentEnvironment().getH5Url() + "/web/index.html#/pages/feedback/teenage?id=" + SpUtil.getToken());
intent.putExtra("title", "1");
startActivity(intent);
} else {
// 如果没有设置青少年模式,应该导航到首页
try {
ARouter.getInstance().build(ARouteConstants.ME).navigation();
} catch (Exception e) {
Log.e("LaunchPageActivity", "导航到首页失败", e);
}
}
finish();
return;
}
// if (shouldRestoreRoom()) {
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页").withString("roomId", CommonAppContext.getInstance().playId).navigation();
// }
}
private boolean shouldRestoreRoom() {
// 检查是否应该恢复房间:
// 1. 应用有正在播放的房间
// 2. 应用应该显示房间
// 3. 应用是从后台恢复的(通过检查 CommonAppContext 状态)
return CommonAppContext.getInstance().isPlaying
&& CommonAppContext.getInstance().isShow;
}
@Override
protected void initData() {
handler = new Handler();
// 定义一个Runnable
Runnable runnable = new Runnable() {
@Override
public void run() {
initLogin();
}
};
if (SpUtil.isAgreePolicy()) {
initLogin();
// //延迟1.5秒执行
// handler.postDelayed(runnable, 2500);
} else {
policyDialog = new PolicyDialog(this);
policyDialog.setCancelable(false);
policyDialog.setCanceledOnTouchOutside(false);
policyDialog.setPolicyClickListener(new PolicyDialog.PolicyClickListener() {
@Override
public void policyAgree() {
SpUtil.completeAgreePolicy();
// CommonAppContext.getInstance().initialization();
initLogin();
}
@Override
public void policyExit() {
finish();
}
});
policyDialog.show();
}
}
@Override
protected void onDestroy() {
// 如果 PolicyDialog 仍在显示,则 dismiss 它
if (policyDialog != null && policyDialog.isShowing()) {
policyDialog.dismiss();
policyDialog = null;
}
// 移除所有待处理的回调以防止内存泄漏
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
super.onDestroy();
}
@Override
protected void initView() {
}
private void initLogin() {
// 在启动新 Activity 前先关闭对话框
if (policyDialog != null && policyDialog.isShowing()) {
policyDialog.dismiss();
policyDialog = null;
}
startActivity(new Intent(this, PasswordLoginActivity.class));
finish();
}
@Override
protected int getLayoutId() {
return R.layout.activity_launch_page;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!isTaskRoot()) {
finish();
return;
}
}
}

View File

@@ -0,0 +1,99 @@
package com.xscm.midi;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.blankj.utilcode.util.ToastUtils;
import com.xscm.modulelogin.activity.ImproveInfoActivity;
import com.xscm.modulelogin.activity.SwitchAccountsActivity;
import com.xscm.modulemain.activity.MainActivity;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.UserBean;
import com.xscm.moduleutil.http.BaseObserver;
import com.xscm.moduleutil.presenter.BasePresenter;
import org.greenrobot.eventbus.EventBus;
import java.util.List;
import io.reactivex.disposables.Disposable;
public class LaunchPresenter extends BasePresenter<LaunchContacter.View> implements LaunchContacter.ILoginPre {
public LaunchPresenter(LaunchContacter.View view, Context context) {
super(view, context);
}
@Override
public void oauthLogin(String login_token) {
api.oauthLogin(login_token, new BaseObserver<List<UserBean>>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(List<UserBean> userBeans) {
loginSuccess(userBeans);
}
});
}
@Override
public void address_ip(String address_ip) {
api.address_ip(address_ip, new BaseObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
// addDisposable(d);
}
@Override
public void onNext(String s) {
}
});
}
public void loginSuccess(List<UserBean> userBean) {
if (userBean==null) {
ToastUtils.showShort("登录失败请重试");
return;
}
if (userBean.size()==1) {
CommonAppContext.getInstance().setUser(userBean.get(0));
// PreferencesUtils.putString( CommonAppContext.getInstance(), "mobile", userBean.get());
if (isViewAttach()) {
// MvpRef.get().disLoadings();
}
if (userBean.get(0).getSex() == 0) {
try {
Intent intent = new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), ImproveInfoActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("userBean", userBean.get(0));
intent.putExtras(bundle);
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
} else {
com.blankj.utilcode.util.ActivityUtils.startActivity(MainActivity.class);
}
}else {
Intent intent=new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), SwitchAccountsActivity.class);
Bundle bundle=new Bundle();
bundle.putSerializable("userBean", userBean.get(0));
intent.putExtras(bundle);
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
}
EventBus.getDefault().post(userBean);
// EventBus.getDefault().post(new SplashFinishEvent());
// AppLog.setUserUniqueID(userBean.getUser_id()); // 设置您自己的账号体系ID, 并保证其唯一性
}
}

View File

@@ -0,0 +1,662 @@
package com.qxcm.qxlive;
import static android.view.View.VISIBLE;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.PasswordTransformationMethod;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import com.alibaba.fastjson.JSON;
import com.alipay.sdk.app.AuthTask;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ThreadUtils;
import com.hjq.toast.ToastUtils;
import com.mobile.auth.gatewayauth.AuthUIConfig;
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
import com.mobile.auth.gatewayauth.PreLoginResultListener;
import com.mobile.auth.gatewayauth.TokenResultListener;
import com.mobile.auth.gatewayauth.model.TokenRet;
import com.qxcm.qxlive.databinding.ActivityPasswordLoginBinding;
import com.xscm.modulelogin.activity.ImproveInfoActivity;
import com.xscm.modulelogin.even.LoginFinishEvent;
import com.xscm.modulelogin.present.LoginContacter;
import com.xscm.modulelogin.present.LoginPresenter;
import com.xscm.modulemain.activity.MainActivity;
import com.xscm.moduleutil.activity.BaseMvpActivity;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.bean.ThemeBean;
import com.xscm.moduleutil.bean.UserBean;
import com.xscm.moduleutil.utils.BarUtils;
import com.xscm.moduleutil.utils.PreferencesUtils;
import com.xscm.moduleutil.utils.logger.Logger;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, ActivityPasswordLoginBinding> implements LoginContacter.View, View.OnClickListener {
private CountDownTimer mTimer;
public String mobile;
private int type;//1:验证码登录2密码登录
boolean isPasswordVisible = false;
public PhoneNumberAuthHelper phoneNumberAuthHelper;
private TokenResultListener tokenResultListener;
private boolean canOnePass;
@Override
protected void initData() {
}
@Override
protected int getLayoutId() {
return R.layout.activity_password_login;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
// 检查是否已经创建过该Activity
if (!isTaskRoot()) {
Intent intent = getIntent();
if (intent != null) {
String action = intent.getAction();
// 如果是从Launcher启动的并且Activity已经存在则finish当前实例
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
finish();
return;
}
}
}
// 新增版本检查逻辑
checkAppVersion();
super.onCreate(savedInstanceState);
// EventBus.getDefault().register(this);
// AppLogUtil.reportAppLog(AppLogEvent.A0101);
}
private void checkAppVersion() {
// 获取当前版本号
int currentVersionCode = 0;
try {
currentVersionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
} catch (Exception e) {
e.printStackTrace();
}
// 从SharedPreferences中获取上次运行的版本号
int lastVersionCode = PreferencesUtils.getInt(CommonAppContext.getInstance(), "last_version_code", 0);
// 如果版本号不同,说明应用已更新
if (currentVersionCode != lastVersionCode) {
// 保存当前版本号
PreferencesUtils.putInt(CommonAppContext.getInstance(), "last_version_code", currentVersionCode);
// 如果不是首次安装,则需要清理任务栈
if (lastVersionCode != 0) {
clearTaskAndRestart();
}
}
}
private void clearTaskAndRestart() {
// 清理所有Activity并重启应用
Intent intent = new Intent(this, PasswordLoginActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
finish();
}
@Override
protected void onDestroy() {
EventBus.getDefault().unregister(this);
if (phoneNumberAuthHelper!=null) {
phoneNumberAuthHelper.hideLoginLoading();
//获取成功 dimiss就去登录、登录成功
phoneNumberAuthHelper.quitLoginPage();
}
super.onDestroy();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void finishEvent(LoginFinishEvent event) {
finish();
}
@Override
protected void initView() {
super.initView();
MvpPre.getThemeData();
initQuickLogin();
checkOnePass();
BarUtils.setStatusBarAlpha(this, 0);
mBinding.edPhone.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
setUpLoginBtn();
}
@Override
public void afterTextChanged(Editable s) {
}
});
mBinding.edPhone.setOnFocusChangeListener(new View.
OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (mBinding.edPhone == null) {
return;
}
if (hasFocus) {
mBinding.relPhone.setSelected(true);
} else {
// 此处为失去焦点时的处理内容
mBinding.relPhone.setSelected(false);
}
}
});
mBinding.edPhone.setText(PreferencesUtils.getString(CommonAppContext.getInstance(), "mobile"));
if (!TextUtils.isEmpty(mobile)) {
mBinding.edPhone.setText(mobile);
}
mBinding.tvCodeText.setOnClickListener(this::onClick);
mBinding.flLogin.setOnClickListener(this::onClick);
mBinding.tvYhxy.setOnClickListener(this::onClick);
mBinding.tvYsxy.setOnClickListener(this::onClick);
mBinding.ivZfb.setOnClickListener(this::onClick);
mBinding.ivWeixin.setOnClickListener(this::onClick);
mBinding.tvSendCode.setOnClickListener(this::onClick);
mBinding.ivEye.setOnClickListener(this::onClick);
if (mBinding.tvCodeText.getText().equals("切换密码登录")){
type=1;
}else {
type=2;
}
}
private void initQuickLogin() {
tokenResultListener = new TokenResultListener() {
@Override
public void onTokenSuccess(String s) {
Logger.e("onTokenSuccess", s);
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
TokenRet tokenRet = null;
try {
tokenRet = JSON.parseObject(s, TokenRet.class);
if (tokenRet != null && ("600000").equals(tokenRet.getCode())) {
LogUtils.e("@@@",tokenRet.getToken());
MvpPre.oauthLoginLogin(tokenRet.getToken());
// phoneNumberAuthHelper.hideLoginLoading();
// //获取成功 dimiss就去登录、登录成功
// phoneNumberAuthHelper.quitLoginPage();
}
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
@Override
public void onTokenFailed(String s) {
Logger.e("onTokenFailed", s);
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {
phoneNumberAuthHelper.hideLoginLoading();
phoneNumberAuthHelper.quitLoginPage();
}
});
}
};
try {
phoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(getApplicationContext(), null);
phoneNumberAuthHelper.getReporter().setLoggerEnable(true);
// phoneNumberAuthHelper.setAuthSDKInfo("6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=");
phoneNumberAuthHelper.setAuthSDKInfo(((CommonAppContext) getApplication()).getCurrentEnvironment().getALI_AUTH_KEY());
phoneNumberAuthHelper.checkEnvAvailable(2);
} catch (Throwable ignored) {
Logger.e("initAuthSDK", ignored);
}
}
private void checkOnePass() {
if (!TextUtils.isEmpty(CommonAppContext.getInstance().getToken()) && !TextUtils.isEmpty(CommonAppContext.getInstance().getUser().getTencent_im())) {
isRoot();
return;
}
showLoadings();
if (phoneNumberAuthHelper != null) {
phoneNumberAuthHelper.accelerateLoginPage(3 * 1000, new PreLoginResultListener() {
@Override
public void onTokenSuccess(String s) {
Logger.e("onTokenSuccess", s);
canOnePass = true;
isRoot();
}
@Override
public void onTokenFailed(String s, String s1) {
Logger.e("onTokenFailed", "错误信息" + s, s1);
isRoot();
}
});
} else {
canOnePass = false;
isRoot();
}
}
private void isRoot() {
runOnUiThread(new Runnable() {
@Override
public void run() {
disLoadings();
if (!PasswordLoginActivity.this.isTaskRoot()) {
Intent intent = getIntent();
if (intent != null) {
String action = intent.getAction();
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
finish();
} else {
goNextActivity();
}
} else {
goNextActivity();
}
} else {
goNextActivity();
}
}
});
}
private void goNextActivity() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (isFinishing() || isDestroyed()) {
return;
}
}
if (TextUtils.isEmpty(CommonAppContext.getInstance().getToken()) || TextUtils.isEmpty(CommonAppContext.getInstance().getUser().getTencent_im())) {
Logger.e("SplashEnd", "ARouters.CODE_LOGIN");
if (canOnePass) {
phoneNumberAuthHelper.setAuthListener(tokenResultListener);
doOnePass();
} else {
}
} else {
Logger.e("SplashEnd", "ARouters.MAIN");
UserBean userBean = CommonAppContext.getInstance().getUser();
// TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), "u"+userBean.getUser_id(), userBean.getTencent_im(), new TUICallback() {
// @Override
// public void onError(final int code, final String desc) {
// LogUtils.e("@@@",code,"描述:",desc);
// }
// @Override
// public void onSuccess() {
// LogUtils.e("@@@","成功");
//
// }
// });
if (userBean.getSex() == 0) {
Intent intent = new Intent(this, ImproveInfoActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("userBean", userBean);
intent.putExtras(bundle);
startActivity(intent);
finish();
} else {
EventBus.getDefault().post(userBean);
startActivity(new Intent(this, MainActivity.class));
finish();
}
// finish();
}
}
private void doOnePass() {
AuthUIConfig authUIConfig = new AuthUIConfig.Builder()
//导航栏
.setNavColor(Color.TRANSPARENT)
.setNavReturnHidden(true)
.setNavHidden(true)
.setNavText("")
.setNavTextColor(Color.BLACK)
.setWebNavColor(Color.TRANSPARENT)
.setWebNavTextColor(Color.BLACK)
.setWebNavReturnImgPath("ic_topbar_back_dark")
//状态栏区
.setStatusBarColor(Color.TRANSPARENT)
.setLightColor(false)
.setWebViewStatusBarColor(Color.TRANSPARENT)
.setStatusBarUIFlag(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
//logo区
.setLogoImgPath("login_log")
.setLogoWidth(142)
.setLogoHeight(142)
.setLogoOffsetY(54)
.setLogoHidden(false)
.setLogoScaleType(ImageView.ScaleType.FIT_XY)
//Slogan
.setSloganText("本机号码")
.setSloganTextColor(Color.parseColor("#A8A8A8"))
.setSloganTextSize(12)
.setSloganOffsetY(236)
//掩码栏
.setNumberColor(Color.BLACK)
.setNumberSize(30)
.setNumFieldOffsetY(263)
.setNumberLayoutGravity(Gravity.CENTER_HORIZONTAL)
//登录按钮
.setLogBtnText("一键登录")
.setLogBtnWidth(300)
.setLogBtnHeight(42)
.setLogBtnOffsetY(325)
.setLogBtnTextSize(14)
.setLogBtnTextColor(getResources().getColor(R.color.white))
// .setLogBtnBackgroundPath("theme_bg")
.setLogBtnBackgroundDrawable(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.login_btn_bg))
//切换到其他方式
.setSwitchAccText("其他登录方式")
.setSwitchAccTextColor(Color.parseColor("#333333"))
.setSwitchAccTextSize(12)
.setSwitchOffsetY(390)
//协议栏
.setAppPrivacyOne("《用户协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6")
.setAppPrivacyTwo("《隐私协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4")
.setAppPrivacyColor(Color.parseColor("#000000"), Color.parseColor("#22BB79"))
.setPrivacyBefore("登录即代表同意")
.setPrivacyEnd("并授权获得号码")
.setPrivacyTextSize(11)
.setPrivacyAlertContentVerticalMargin(20)
.setPrivacyMargin(39)
.setPrivacyState(true)
.setCheckboxHidden(false)
.setCheckedImgPath("ic_agreement_selected")
.setUncheckedImgPath("ic_agreement_unselect")
.setPrivacyOffsetX(2)
.setVendorPrivacyPrefix("")
.setVendorPrivacySuffix("")
.setProtocolAction("com.qxcm.qxlive.PROTOCOL_WEBVIEW")//跳转到自定义的页面展示隐私协议
.setPackageName("com.qxcm.qxlive")
//全页面属性
.setAuthPageActIn("in_activity", "out_activity")
.setAuthPageActOut("in_activity", "out_activity")
// .setPageBackgroundPath("log_bj")
.setPageBackgroundDrawable(getResources().getDrawable(com.xscm.moduleutil.R.mipmap.log_bj))
.create();
phoneNumberAuthHelper.setAuthUIConfig(authUIConfig);
phoneNumberAuthHelper.getLoginToken(getApplicationContext(), 5000);
}
@Override
protected LoginPresenter bindPresenter() {
return new LoginPresenter(this, this);
}
@Override
public void showLoadings() {
showLoading();
}
@Override
public void disLoadings() {
disLoading();
}
private void setUpLoginBtn() {
String text = mBinding.edPhone.getText().toString();
if (text.length() == 11) {
mBinding.flLogin.setEnabled(true);
mBinding.ivLoginBg.setAlpha(1f);
} else {
mBinding.ivLoginBg.setAlpha(0.3f);
mBinding.flLogin.setEnabled(false);
}
}
@Override
public void onClick(View v) {
int id = v.getId();
if (id == R.id.tv_code_text) {
// Intent intent = new Intent(this, LoginActivity.class);
// intent.putExtra("mobile", mBinding.edPhone.getText().toString());
// startActivity(intent);
// finish();
if (mBinding.tvCodeText.getText().equals("切换密码登录")){
mBinding.rlPassCode.setVisibility(VISIBLE);
mBinding.rlCode.setVisibility(View.GONE);
mBinding.tvCodeText.setText("切换验证码登录");
mBinding.tvLoginText.setText("密码登录");
type=2;
}else {
mBinding.rlPassCode.setVisibility(View.GONE);
mBinding.rlCode.setVisibility(VISIBLE);
mBinding.tvCodeText.setText("切换密码登录");
mBinding.tvLoginText.setText("验证码登录");
type=1;
}
}
else if (id == R.id.fl_login) {
if (!mBinding.cbPrivacy.isChecked()) {
ToastUtils.show("请先勾选服务条款");
return;
}
String phone = mBinding.edPhone.getText().toString().trim();
if (TextUtils.isEmpty(phone)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
return;
}
if (type==1) {
String code = mBinding.edPassword.getText().toString().trim();
if (TextUtils.isEmpty(code)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
return;
}
MvpPre.login(phone, "", code, 1);
}else if (type==2) {
String password = mBinding.edPasswordCode.getText().toString().trim();
if (TextUtils.isEmpty(password)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入密码");
return;
}
MvpPre.login(phone, password, "", 2);
}
} else if (id == R.id.tv_yhxy) {
MvpPre.ysxl();
} else if (id == R.id.tv_ysxy) {
MvpPre.yhxy();
} else if (id == R.id.iv_zfb) {
if (!mBinding.cbPrivacy.isChecked()) {
ToastUtils.show("请先勾选服务条款");
return;
}
MvpPre.authorization("zfb");
// MvpPre.authorization(SHARE_MEDIA.QQ);
} else if (id == R.id.iv_weixin) {
if (!mBinding.cbPrivacy.isChecked()) {
ToastUtils.show("请先勾选服务条款");
return;
}
// MvpPre.authorization("wx");
wcLogin();
} else if (id == R.id.tv_send_code) {
String phone = mBinding.edPhone.getText().toString().trim();
if (TextUtils.isEmpty(phone)) {
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
return;
}
sendCodeSuccess(phone);
MvpPre.sendCode(phone, 1);
}else if (id == R.id.iv_eye) {
if (!isPasswordVisible) {
mBinding.edPassword.setInputType(android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
mBinding.ivEye.setImageResource(com.xscm.moduleutil.R.mipmap.eye_visible); // 设置按钮文本为隐藏密码
} else {
mBinding.edPassword.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD);
mBinding.edPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());
mBinding.ivEye.setImageResource(com.xscm.moduleutil.R.mipmap.eye_close); // 设置按钮文本为显示密码
}
mBinding.edPassword.setSelection(mBinding.edPassword.getText().length()); // 将光标移动到文字末尾
isPasswordVisible = !isPasswordVisible; // 切换状态
}
}
private void wcLogin() {
//发起登陆请求前先注册微信api
IWXAPI api = WXAPIFactory.createWXAPI(this,CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(),true);
api.registerApp(CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
if (!api.isWXAppInstalled()){
//todo 提醒未安装微信
com.blankj.utilcode.util.ToastUtils.showShort("请安装微信客户端");
return;
}
//开始发起登陆请求
final SendAuth.Req req = new SendAuth.Req();
req.scope = "snsapi_userinfo";
req.state = "wechat_sdk_demo_test";
api.sendReq(req);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void loginEvent(BaseResp event) {
if (event.errCode ==BaseResp.ErrCode.ERR_OK){
SendAuth.Resp authResp = (SendAuth.Resp)event;
LogUtils.e("@@@",authResp.code);
MvpPre.oauthLogin(authResp.code,1);
}
}
private void releaseTimer() {
if (mTimer != null) {
mTimer.cancel();
mTimer = null;
}
}
public void sendCodeSuccess(String phoneNumber) {
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
mBinding.tvSendCode.setEnabled(false);
mBinding.tvSendCode.setAlpha(0.5f);
releaseTimer();
if (mTimer != null) {
mTimer.cancel();
}
mTimer = new CountDownTimer(60000L, 1000L) {
@Override
public void onTick(long millisUntilFinished) {
if (mBinding.tvSendCode != null) {
mBinding.tvSendCode.setText(String.format("重新发送(%s", millisUntilFinished / 1000));
}
}
@Override
public void onFinish() {
mBinding.tvSendCode.setAlpha(1f);
mBinding.tvSendCode.setEnabled(true);
mBinding.tvSendCode.setText("重新发送");
}
};
mTimer.start();
}
@Override
public void sendCodeSuccess1(String s) {
LogUtils.e(s);
}
@Override
public void loginSuccess(UserBean userBean) {
}
@Override
public void authorizationSuccess(String s) {
zfbLogin(s);
}
@Override
public void ysxlSuccess(String s) {
}
@Override
public void getThemeData(ThemeBean themeBean) {
}
private void zfbLogin(String s) {
LogUtils.e("@@@",s);
CommonAppContext.getInstance();
if (!CommonAppContext.isAlipayInstalled(this)){
com.blankj.utilcode.util.ToastUtils.showShort("请安装支付宝客户端");
return;
}
String authInfo = s;
// String authInfo = "apiname=com.alipay.account.auth&app_id=2021005152631691&app_name=yusheng&auth_type=AUTHACCOUNT&biz_type=openservice&method=alipay.open.auth.sdk.code.get&pid=2088170624624316&product_id=APP_FAST_LOGIN&scope=kuaijie&sign_type=RSA2&target_id=20141225xxxx&sign=fMcp4GtiM6rxSIeFnJCVePJKV43eXrUP86CQgiLhDHH2u%2FdN75eEvmywc2ulkm7qKRetkU9fbVZtJIqFdMJcJ9Yp%2BJI%2FF%2FpESafFR6rB2fRjiQQLGXvxmDGVMjPSxHxVtIqpZy5FDoKUSjQ2%2FILDKpu3%2F%2BtAtm2jRw1rUoMhgt0%3D";
Runnable authRunnable = new Runnable() {
@Override
public void run() {
// 构造AuthTask 对象
AuthTask authTask = new AuthTask(PasswordLoginActivity.this);
// 调用授权接口,获取授权结果
Map<String, String> result = authTask.authV2(authInfo, true);
LogUtils.e(result);
if (result.get("resultStatus").equals("9000")){
Pattern pattern = Pattern.compile("auth_code=([^&]*)");
Matcher matcher = pattern.matcher(result.get("result"));
if (matcher.find()) {
String authCode = matcher.group(1);
LogUtils.e("AuthCode", authCode);
MvpPre.oauthLogin(authCode,2);
}
}
}
};
Thread authThread = new Thread(authRunnable);
authThread.start();
}
}

View File

@@ -0,0 +1,110 @@
package com.xscm.midi.presenter;
import android.content.Context;
import com.xscm.moduleutil.activity.IPresenter;
import com.xscm.moduleutil.activity.IView;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
public abstract class BasePresenter<V extends IView> implements IPresenter {
protected CompositeDisposable mDisposables = new CompositeDisposable();
// private RemoteDataSource api;
protected Reference<V> MvpRef;
protected Context mContext;
@Deprecated
public BasePresenter(V view) {
attachView(view);
}
public BasePresenter(V view, Context context) {
attachView(view);
mContext = context;
}
private void attachView(V view) {
MvpRef = new WeakReference<V>(view);
}
protected V getView() {
if (MvpRef != null) {
return MvpRef.get();
}
return null;
}
// protected RemoteDataSource getApi() {
// if (api == null) {
// api = RemoteDataSource.getInstance();
// }
// return api;
// }
/**
* 主要用于判断IView的生命周期是否结束防止出现内存泄露状况
*
* @return
*/
public boolean isViewAttach() {
return MvpRef != null && MvpRef.get() != null;
}
@Override
public void detachView() {
cancelRequest();
if (MvpRef != null) {
MvpRef.clear();
MvpRef = null;
}
// if (api != null) {
// api = null;
// }
unBindView();
}
public void unBindView() {
if (MvpRef != null) {
MvpRef.clear();
}
mContext=null;
}
/**
* 加入订阅对象
*
* @param disposable
*/
public void addDisposable(Disposable disposable) {
mDisposables.add(disposable);
}
/**
* 移除订阅对象
*
* @param disposable
*/
public void removeDisposable(Disposable disposable) {
mDisposables.remove(disposable);
}
/**
* 取消所有请求
*/
public void cancelRequest() {
if (mDisposables != null) {
mDisposables.clear(); // clear时网络请求会随即cancel
mDisposables = null;
}
}
}

View File

@@ -0,0 +1,233 @@
package com.xscm.midi.wxapi;
import android.app.Activity;
import android.os.Bundle;
import com.blankj.utilcode.util.ToastUtils;
import com.xscm.moduleutil.base.CommonAppContext;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import org.greenrobot.eventbus.EventBus;
public class WXEntryActivity extends Activity implements IWXAPIEventHandler{
// private static String TAG = "MicroMsg.WXEntryActivity";
//
// private IWXAPI api;
// private MyHandler handler;
//
// private static class MyHandler extends Handler {
// private final WeakReference<WXEntryActivity> wxEntryActivityWeakReference;
//
// public MyHandler(WXEntryActivity wxEntryActivity){
// wxEntryActivityWeakReference = new WeakReference<WXEntryActivity>(wxEntryActivity);
// }
//
// @Override
// public void handleMessage(Message msg) {
// int tag = msg.what;
// switch (tag) {
// case 0: {
// Bundle data = msg.getData();
// JSONObject json = null;
// try {
// json = new JSONObject(data.getString("result"));
// String openId, accessToken, refreshToken, scope;
// openId = json.getString("openid");
// accessToken = json.getString("access_token");
// refreshToken = json.getString("refresh_token");
// scope = json.getString("scope");
//// Intent intent = new Intent(wxEntryActivityWeakReference.get(), SendToWXActivity.class);
//// intent.putExtra("openId", openId);
//// intent.putExtra("accessToken", accessToken);
//// intent.putExtra("refreshToken", refreshToken);
//// intent.putExtra("scope", scope);
//// wxEntryActivityWeakReference.get().startActivity(intent);
// } catch (JSONException e) {
// Log.e(TAG, e.getMessage());
// }
// }
// }
// }
// }
//
// @Override
// public void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
//
// api = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(), false);
// handler = new MyHandler(this);
//
// try {
// Intent intent = getIntent();
// api.handleIntent(intent, this);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//
// @Override
// protected void onNewIntent(Intent intent) {
// super.onNewIntent(intent);
//
// setIntent(intent);
// api.handleIntent(intent, this);
// }
//
// @Override
// public void onReq(BaseReq req) {
// switch (req.getType()) {
// case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
//// goToGetMsg();
// break;
// case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
//// goToShowMsg((ShowMessageFromWX.Req) req);
// break;
// default:
// break;
// }
// finish();
// }
//
// @Override
// public void onResp(BaseResp resp) {
// int result = 0;
//
// switch (resp.errCode) {
// case BaseResp.ErrCode.ERR_OK:
//// result = com.qxcm.moduleutil.R.string.errcode_success;
// break;
// case BaseResp.ErrCode.ERR_USER_CANCEL:
//// result = R.string.errcode_cancel;
// break;
// case BaseResp.ErrCode.ERR_AUTH_DENIED:
//// result = R.string.errcode_deny;
// break;
// case BaseResp.ErrCode.ERR_UNSUPPORT:
//// result = R.string.errcode_unsupported;
// break;
// default:
//// result = R.string.errcode_unknown;
// break;
// }
//
// Toast.makeText(this, getString(result) + ", type=" + resp.getType(), Toast.LENGTH_SHORT).show();
//
//
// if (resp.getType() == ConstantsAPI.COMMAND_SUBSCRIBE_MESSAGE) {
// SubscribeMessage.Resp subscribeMsgResp = (SubscribeMessage.Resp) resp;
// String text = String.format("openid=%s\ntemplate_id=%s\nscene=%d\naction=%s\nreserved=%s",
// subscribeMsgResp.openId, subscribeMsgResp.templateID, subscribeMsgResp.scene, subscribeMsgResp.action, subscribeMsgResp.reserved);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_LAUNCH_WX_MINIPROGRAM) {
// WXLaunchMiniProgram.Resp launchMiniProgramResp = (WXLaunchMiniProgram.Resp) resp;
// String text = String.format("openid=%s\nextMsg=%s\nerrStr=%s",
// launchMiniProgramResp.openId, launchMiniProgramResp.extMsg,launchMiniProgramResp.errStr);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_OPEN_BUSINESS_VIEW) {
// WXOpenBusinessView.Resp launchMiniProgramResp = (WXOpenBusinessView.Resp) resp;
// String text = String.format("openid=%s\nextMsg=%s\nerrStr=%s\nbusinessType=%s",
// launchMiniProgramResp.openId, launchMiniProgramResp.extMsg,launchMiniProgramResp.errStr,launchMiniProgramResp.businessType);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_OPEN_BUSINESS_WEBVIEW) {
// WXOpenBusinessWebview.Resp response = (WXOpenBusinessWebview.Resp) resp;
// String text = String.format("businessType=%d\nresultInfo=%s\nret=%d",response.businessType,response.resultInfo,response.errCode);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_SENDAUTH) {
// SendAuth.Resp authResp = (SendAuth.Resp)resp;
// final String code = authResp.code;
//// NetworkUtil.sendWxAPI(handler, String.format("https://api.weixin.qq.com/sns/oauth2/access_token?" +
//// "appid=%s&secret=%s&code=%s&grant_type=authorization_code", "wxd930ea5d5a258f4f",
//// "1d6d1d57a3dd063b36d917bc0b44d964", code), NetworkUtil.GET_TOKEN);
// }
// finish();
// }
//
//// private void goToGetMsg() {
//// Intent intent = new Intent(this, GetFromWXActivity.class);
//// intent.putExtras(getIntent());
//// startActivity(intent);
//// finish();
//// }
////
//// private void goToShowMsg(ShowMessageFromWX.Req showReq) {
//// WXMediaMessage wxMsg = showReq.message;
//// WXAppExtendObject obj = (WXAppExtendObject) wxMsg.mediaObject;
////
//// StringBuffer msg = new StringBuffer();
//// msg.append("description: ");
//// msg.append(wxMsg.description);
//// msg.append("\n");
//// msg.append("extInfo: ");
//// msg.append(obj.extInfo);
//// msg.append("\n");
//// msg.append("filePath: ");
//// msg.append(obj.filePath);
////
//// Intent intent = new Intent(this, ShowFromWXActivity.class);
//// intent.putExtra(Constants.ShowMsgActivity.STitle, wxMsg.title);
//// intent.putExtra(Constants.ShowMsgActivity.SMessage, msg.toString());
//// intent.putExtra(Constants.ShowMsgActivity.BAThumbData, wxMsg.thumbData);
//// startActivity(intent);
//// finish();
//// }
private final String TAG = this.getClass().getSimpleName();
public static final String APP_ID = CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId();
public static final String APP_SECRET = "请自己填写";
private IWXAPI mApi;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mApi = WXAPIFactory.createWXAPI(this, APP_ID, true);
mApi.handleIntent(this.getIntent(), this);
}
//微信发送的请求将回调到onReq方法
@Override
public void onReq(BaseReq baseReq) {
}
//发送到微信请求的响应结果
@Override
public void onResp(BaseResp resp) {
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
//发送成功
ToastUtils.showShort("发送成功",resp.transaction);
EventBus.getDefault().post(resp);
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
//发送取消
ToastUtils.showShort("发送取消",resp);
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
ToastUtils.showShort("发送被拒绝",resp);
//发送被拒绝
break;
default:
//发送返回
break;
}
finish();
}
}

View File

@@ -0,0 +1,71 @@
package com.xscm.midi.wxapi;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.blankj.utilcode.util.ToastUtils;
import com.tencent.mm.opensdk.constants.ConstantsAPI;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.xscm.moduleutil.base.CommonAppContext;
import com.xscm.moduleutil.event.PayEvent;
import org.greenrobot.eventbus.EventBus;
public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler {
private IWXAPI api;
public static final String APP_ID = CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
api = WXAPIFactory.createWXAPI(this, APP_ID);
api.handleIntent(getIntent(), this); // 必须调用,否则无法接收回调
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
api.handleIntent(intent, this);
}
@Override
public void onReq(BaseReq baseReq) {
}
@Override
public void onResp(BaseResp resp) {
// 支付结果回调resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX
if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
// 支付成功:这里需要调用后台接口确认支付状态(避免本地判断不可靠)
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
checkPayResultFromServer();
break;
default:
// 支付失败
checkPayResultFromServer();
break;
}
finish(); // 处理完后关闭页面
}
}
// 关键:必须从后台确认支付状态(不能仅依赖前端回调)
private void checkPayResultFromServer() {
// 调用后台接口,传入订单号查询实际支付状态
// 用户取消支付
ToastUtils.showShort("支付取消");
PayEvent messageEvent = new PayEvent(-2, "支付取消");
EventBus.getDefault().post(messageEvent);
}
}

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="20dp"/>
<solid android:color="#80000000"/>
</shape>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#80000000"/>
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="12sp"/>
<stroke android:color="@color/white" android:width="1dp"/>
<solid android:color="#80000000"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data></data>
<FrameLayout
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent">
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000" />
<FrameLayout
android:id="@+id/btn_skip_img"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="right"
android:layout_marginTop="37dp"
android:layout_marginRight="15dp"
android:background="@drawable/bg_launcher_skip"
android:visibility="invisible">
<com.xscm.moduleutil.custon.CircleProgress
android:id="@+id/progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cp_bg_color="@color/white"
app:cp_cur_progress="0"
app:cp_fg_color="#ff7200"
app:cp_stroke_width="2dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/recommend_skip"
android:textColor="@color/white"
android:textSize="11sp" />
</FrameLayout>
<TextView
android:id="@+id/btn_skip_video"
android:layout_width="44dp"
android:layout_height="26dp"
android:layout_gravity="right"
android:layout_marginTop="37dp"
android:layout_marginRight="15dp"
android:background="@drawable/bg_launcher_skip_2"
android:gravity="center"
android:text="@string/recommend_skip"
android:textColor="@color/white"
android:textSize="11sp"
android:visibility="invisible" />
<LinearLayout
android:id="@+id/ad_tip"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="50dp"
android:background="@drawable/bg_launcher_ad_tip"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:visibility="invisible">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/a_067"
android:textColor="@color/white"
android:textSize="13sp" />
<ImageView
android:layout_width="13dp"
android:layout_height="13dp"
android:src="@mipmap/icon_arrow_right_3" />
</LinearLayout>
<ImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:src="@mipmap/screen"
android:scaleType="centerCrop"
android:visibility="visible" />
</FrameLayout>
</layout>

View File

@@ -0,0 +1,383 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@mipmap/log_bj" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|top|center"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_67"
android:gravity="left|center"
android:orientation="vertical">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/login_title" />
<!-- <TextView-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="@dimen/dp_30"-->
<!-- android:text="@string/login_web_title"-->
<!-- android:textColor="@color/color_FF333333"-->
<!-- android:textSize="20sp"-->
<!-- android:textStyle="bold" />-->
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_16">
<TextView
android:id="@+id/tv_login_text"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_27"
android:layout_centerVertical="true"
android:text="@string/login_title"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rel_phone"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_44"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_17"
android:layout_marginRight="@dimen/dp_16"
android:background="@drawable/bg_r16_ffeff2f8">
<ImageView
android:id="@+id/iv_user"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:src="@mipmap/icon_login_user_new" />
<EditText
android:id="@+id/ed_phone"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_28"
android:layout_marginLeft="13dp"
android:layout_marginRight="25dp"
android:layout_toRightOf="@+id/iv_user"
android:background="@android:color/transparent"
android:hint="@string/login_hint_phion"
android:inputType="phone"
android:layout_centerInParent="true"
android:maxLength="11"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/color_FFCCCCCC"
android:textSize="@dimen/sp_17" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_code"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_44"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:layout_marginRight="20dp"
android:background="@drawable/bg_r16_ffeff2f8">
<ImageView
android:id="@+id/iv_code"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:src="@mipmap/icon_login_code" />
<EditText
android:id="@+id/ed_password"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_28"
android:layout_marginLeft="13dp"
android:layout_marginRight="25dp"
android:layout_toRightOf="@+id/iv_code"
android:layout_centerInParent="true"
android:background="@android:color/transparent"
android:hint="@string/login_hint_code"
android:inputType="number"
android:maxLength="20"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/color_FFCCCCCC"
android:textSize="@dimen/sp_16" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="center"
>
<TextView
android:id="@+id/tv_send_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_13"
android:gravity="right"
android:text="@string/login_send_code"
android:textColor="#22BB79"
android:textSize="@dimen/sp_16"
tools:visibility="visible" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_pass_code"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_44"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:layout_marginRight="20dp"
android:visibility="gone"
android:background="@drawable/bg_r16_ffeff2f8">
<ImageView
android:id="@+id/iv_pass_code"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:src="@mipmap/icon_login_lick" />
<EditText
android:id="@+id/ed_password_code"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_28"
android:layout_marginLeft="13dp"
android:layout_marginRight="25dp"
android:layout_toRightOf="@+id/iv_pass_code"
android:layout_centerInParent="true"
android:background="@android:color/transparent"
android:hint="@string/login_hint_pass"
android:inputType="textPassword"
android:maxLength="20"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/color_FFCCCCCC"
android:textSize="@dimen/sp_16" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="center"
android:orientation="horizontal">
>
<ImageView
android:id="@+id/iv_eye"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/eye_close"
android:visibility="gone"/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10">
<TextView
android:id="@+id/tv_code_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginRight="16dp"
android:drawableLeft="@mipmap/common_switch_login_icon"
android:drawablePadding="@dimen/dp_3"
android:gravity="center"
android:text="@string/login_btn_switch"
android:textColor="#666666"
android:textSize="12sp"
android:textStyle="bold" />
</RelativeLayout>
<FrameLayout
android:id="@+id/fl_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_38"
android:layout_marginTop="@dimen/dp_23"
android:layout_marginBottom="@dimen/dp_150"
android:layout_marginRight="@dimen/dp_38"
>
<ImageView
android:id="@+id/iv_login_bg"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_42"
android:src="@drawable/theme_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:enabled="false"
android:gravity="center"
android:text="@string/login_btn_login"
android:textColor="@color/color_white"
android:textSize="14sp" />
</FrameLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:paddingBottom="@dimen/dp_7"
>
<TextView
android:id="@+id/tv_login_error"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginBottom="@dimen/dp_7"
android:gravity="center"
android:text="@string/login_btn_qt"
android:textColor="@color/color_666666"
android:textSize="@dimen/sp_12"
tools:visibility="visible" />
<LinearLayout
android:id="@+id/ll_other_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_login_error"
android:gravity="center_horizontal"
android:layout_marginBottom="@dimen/dp_55"
android:orientation="horizontal"
android:visibility="visible"
tools:visibility="visible">
<ImageView
android:id="@+id/iv_weixin"
android:layout_width="@dimen/dp_44"
android:layout_height="44dp"
android:src="@mipmap/sign_icon_wechat" />
<ImageView
android:id="@+id/iv_zfb"
android:layout_width="@dimen/dp_44"
android:layout_height="@dimen/dp_44"
android:layout_marginLeft="@dimen/dp_33"
android:src="@mipmap/sign_icon_zfb"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll_agreement"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_other_login"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="@dimen/dp_25"
android:gravity="center"
android:orientation="horizontal">
<CheckBox
android:id="@+id/cb_privacy"
android:layout_width="@dimen/dp_15"
android:layout_height="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_5"
android:background="@drawable/selector_login_agreement"
android:button="@null" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="我已阅读并同意"
android:textColor="@color/color_FFA8A8A8"
android:textSize="@dimen/sp_11"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_ysxy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《用户协议》"
android:textColor="#22BB79"
android:textSize="@dimen/sp_11"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="和"
android:textColor="@color/color_FFA8A8A8"
android:textSize="@dimen/sp_11"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_yhxy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="《隐私协议》"
android:textColor="#22BB79"
android:textSize="@dimen/sp_11"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
</FrameLayout>
</layout>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,5 @@
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="recommend_skip">Skip</string>
<string name="a_067">Click to jump to third-party applications</string>
</resources>

View File

@@ -0,0 +1,16 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.QxLive" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="global">#ff5878</color>
<color name="background">@color/gray2</color>
<color name="transparent">#00000000</color>
<color name="textColor">#282828</color>
<color name="gray1">#969696</color>
<color name="gray2">#f5f5f5</color>
<color name="gray3">#c8c8c8</color>
<color name="gray4">#B4B4B4</color>
<color name="gray5">#dcdcdc</color>
<color name="yellow">#fffa37</color>
<color name="yellow2">#f0cd08</color>
<color name="yellow3">#FFF34D</color>
<color name="yellow4">#ffdd00</color>
<color name="textColor2">#646464</color>
<color name="red">#ff0000</color>
<color name="pk_red">#FF205E</color>
<color name="pk_blue">#169AFF</color>
<color name="black1">#e6323232</color>
<color name="blue1">#1FC8F8</color>
<color name="blue2">#4998F7</color>
<color name="blue3">#32A0FF</color>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@@ -0,0 +1,5 @@
<resources>
<string name="recommend_skip">跳过</string>
<string name="a_067">点击跳转第三方应用</string>
</resources>

View File

@@ -0,0 +1,113 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:colorBackground">@color/background</item>
<item name="android:textColor">@color/color_1F1C1F</item>
<item name="android:textColorHint">@color/color_FF999999</item>
<item name="android:windowBackground">@color/color_F9FAFA</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowLightStatusBar">true</item>
</style>
<style name="main_SplashThemeImage" parent="AppTheme.NoActionBar">
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<!--StartActivity Style 冷启动效果-->
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@mipmap/screen</item>
</style>
<!-- 在 styles.xml 中添加透明主题 -->
<style name="TransparentTheme" parent="AppTheme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
<style name="LauncherAppTheme" parent="AppTheme">
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowIsTranslucent">true</item>
</style>
<style name="AppthemeActivity" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:windowAllowReturnTransitionOverlap">false</item>
<item name="android:windowEnterTransition">@null</item>
<item name="android:windowExitTransition">@null</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowLightStatusBar">true</item>
</style>
<style name="dialog" parent="AppTheme">
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@color/transparent</item>
<item name="android:backgroundDimAmount">0.5</item>
<!--显示区域以外是否使用黑色半透明背景-->
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="dialog2" parent="AppTheme">
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@color/transparent</item>
<!--显示区域以外是否使用黑色半透明背景-->
<item name="android:backgroundDimEnabled">false</item>
</style>
<style name="bottomToTopAnim" parent="android:Animation">
<item name="android:windowEnterAnimation">@anim/bottomview_anim_enter</item>
<item name="android:windowExitAnimation">@anim/bottomview_anim_exit</item>
</style>
<style name="bottomToTopAnim2" parent="android:Animation">
<item name="android:windowEnterAnimation">@anim/bottomview_anim_enter_2</item>
<item name="android:windowExitAnimation">@anim/bottomview_anim_exit_2</item>
</style>
<style name="leftToRightAnim" parent="android:Animation">
<item name="android:windowEnterAnimation">@anim/left_anim_enter</item>
<item name="android:windowExitAnimation">@anim/left_anim_exit</item>
</style>
<style name="animCenter" parent="android:Animation">
<item name="android:windowEnterAnimation">@anim/anim_center_enter</item>
<item name="android:windowExitAnimation">@anim/anim_center_exit</item>
</style>
<style name="groupLast" parent="AppTheme">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:layout_marginLeft">15dp</item>
<item name="android:layout_marginRight">15dp</item>
<item name="android:background">@color/gray2</item>
</style>
<style name="line2" parent="AppTheme">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">@color/gray2</item>
</style>
<style name="edit_profile_group" parent="AppTheme">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">60dp</item>
<item name="android:paddingLeft">15dp</item>
<item name="android:paddingRight">15dp</item>
</style>
</resources>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>