version:6.4.7
fix: update:增加绑定手机和绑定状态,增加扫码绑定
This commit is contained in:
@@ -29,8 +29,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.aoleyun.sn"
|
applicationId "com.aoleyun.sn"
|
||||||
versionCode 86
|
versionCode 87
|
||||||
versionName "6.4.6"
|
versionName "6.4.7"
|
||||||
|
|
||||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
private static final String TAG = MainActivity.class.getSimpleName();
|
private static final String TAG = MainActivity.class.getSimpleName();
|
||||||
|
|
||||||
public static final String UPDATE_LOCKED_STATUS = "UPDATE_LOCKED_STATUS";
|
public static final String UPDATE_LOCKED_STATUS = "UPDATE_LOCKED_STATUS";
|
||||||
|
public static final String REFRESHACTION = BuildConfig.APPLICATION_ID + ".REFRESH";
|
||||||
|
|
||||||
|
|
||||||
@BindView(R.id.iv_back)
|
@BindView(R.id.iv_back)
|
||||||
ImageView back;
|
ImageView back;
|
||||||
@@ -125,6 +127,8 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
|
|
||||||
@BindView(R.id.tv_bind_statu)
|
@BindView(R.id.tv_bind_statu)
|
||||||
TextView tv_bind_statu;
|
TextView tv_bind_statu;
|
||||||
|
@BindView(R.id.tv_bind_status)
|
||||||
|
TextView tv_bind_status;
|
||||||
@BindView(R.id.iv_qrcode)
|
@BindView(R.id.iv_qrcode)
|
||||||
ImageView iv_qrcode;
|
ImageView iv_qrcode;
|
||||||
@BindView(R.id.tv_bind_time)
|
@BindView(R.id.tv_bind_time)
|
||||||
@@ -397,6 +401,13 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
String classes = studesInfo.getClasses();
|
String classes = studesInfo.getClasses();
|
||||||
String batch = studesInfo.getBatch();
|
String batch = studesInfo.getBatch();
|
||||||
String head_img = studesInfo.getHead_img();
|
String head_img = studesInfo.getHead_img();
|
||||||
|
int bind_statu = studesInfo.getBind_status();
|
||||||
|
if (bind_statu == 1) {
|
||||||
|
String phone = studesInfo.getBind_mobile();
|
||||||
|
tv_bind_status.setText("绑定号码:" + phone);
|
||||||
|
} else {
|
||||||
|
tv_bind_status.setText("未绑定");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
settradeType(trade_type);
|
settradeType(trade_type);
|
||||||
@@ -430,17 +441,17 @@ public class MainActivity extends BaseActivity implements MainAContact.MainView,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getEBagCodeFinish(boolean activation) {
|
public void getEBagCodeFinish(boolean activation) {
|
||||||
if (activation){
|
if (activation) {
|
||||||
mMainAPresenter.getExclusiveAdminApp();
|
mMainAPresenter.getExclusiveAdminApp();
|
||||||
Log.e(TAG, "getEBagCodeFinish: "+"已激活" );
|
Log.e(TAG, "getEBagCodeFinish: " + "已激活");
|
||||||
}else {
|
} else {
|
||||||
Log.e(TAG, "getEBagCodeFinish: "+"未激活" );
|
Log.e(TAG, "getEBagCodeFinish: " + "未激活");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getExclusiveAdminAppFinish() {
|
public void getExclusiveAdminAppFinish() {
|
||||||
Log.e(TAG, "getAdminAppFinish: " );
|
Log.e(TAG, "getAdminAppFinish: ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public class StudentsInfo implements Serializable {
|
|||||||
String head_img;
|
String head_img;
|
||||||
/*1教育,2商用*/
|
/*1教育,2商用*/
|
||||||
int trade_type;
|
int trade_type;
|
||||||
|
String bind_mobile;
|
||||||
|
int bind_status;
|
||||||
|
|
||||||
public String getBatch() {
|
public String getBatch() {
|
||||||
return batch;
|
return batch;
|
||||||
@@ -76,6 +78,22 @@ public class StudentsInfo implements Serializable {
|
|||||||
this.trade_type = trade_type;
|
this.trade_type = trade_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBind_mobile() {
|
||||||
|
return bind_mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBind_mobile(String bind_mobile) {
|
||||||
|
this.bind_mobile = bind_mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBind_status() {
|
||||||
|
return bind_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBind_status(int bind_status) {
|
||||||
|
this.bind_status = bind_status;
|
||||||
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class CommonConfig {
|
|||||||
public final static String STUDENT_ID = "sno";
|
public final static String STUDENT_ID = "sno";
|
||||||
/*头像*/
|
/*头像*/
|
||||||
public final static String HEAD_IMG = "head_img";
|
public final static String HEAD_IMG = "head_img";
|
||||||
|
public final static String USER_PHONE = "user_phone_key";
|
||||||
//保存的用户信息
|
//保存的用户信息
|
||||||
|
|
||||||
/*首次启动app*/
|
/*首次启动app*/
|
||||||
|
|||||||
254
app/src/main/java/com/aoleyun/sn/dialog/CustomDialog.java
Normal file
254
app/src/main/java/com/aoleyun/sn/dialog/CustomDialog.java
Normal file
@@ -0,0 +1,254 @@
|
|||||||
|
package com.aoleyun.sn.dialog;
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
|
import com.aoleyun.sn.R;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* description:自定义dialog
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class CustomDialog extends AlertDialog {
|
||||||
|
/**
|
||||||
|
* 显示的图片
|
||||||
|
*/
|
||||||
|
private ImageView imageIv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示的标题
|
||||||
|
*/
|
||||||
|
private TextView titleTv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示的消息
|
||||||
|
*/
|
||||||
|
private TextView messageTv;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 确认和取消按钮
|
||||||
|
*/
|
||||||
|
private TextView negtiveBn, positiveBn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮之间的分割线
|
||||||
|
*/
|
||||||
|
// private View columnLineView;
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
public CustomDialog(Context context) {
|
||||||
|
super(context, R.style.CustomDialog);
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 都是内容数据
|
||||||
|
*/
|
||||||
|
private String message;
|
||||||
|
private String title;
|
||||||
|
private String positive, negtive;
|
||||||
|
private int imageResId = -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 底部是否只有一个按钮
|
||||||
|
*/
|
||||||
|
private boolean isSingle = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.dialog_custom);
|
||||||
|
//按空白处不能取消动画
|
||||||
|
setCanceledOnTouchOutside(false);
|
||||||
|
//初始化界面控件
|
||||||
|
initView();
|
||||||
|
//初始化界面数据
|
||||||
|
refreshView();
|
||||||
|
//初始化界面控件的事件
|
||||||
|
initEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化界面的确定和取消监听器
|
||||||
|
*/
|
||||||
|
private void initEvent() {
|
||||||
|
//设置确定按钮被点击后,向外界提供监听
|
||||||
|
positiveBn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (onClickBottomListener != null) {
|
||||||
|
onClickBottomListener.onPositiveClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//设置取消按钮被点击后,向外界提供监听
|
||||||
|
negtiveBn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (onClickBottomListener != null) {
|
||||||
|
onClickBottomListener.onNegtiveClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化界面控件的显示数据
|
||||||
|
*/
|
||||||
|
private void refreshView() {
|
||||||
|
//如果用户自定了title和message
|
||||||
|
if (!TextUtils.isEmpty(title)) {
|
||||||
|
titleTv.setText(title);
|
||||||
|
titleTv.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
titleTv.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(message)) {
|
||||||
|
messageTv.setText(message);
|
||||||
|
}
|
||||||
|
//如果设置按钮的文字
|
||||||
|
if (!TextUtils.isEmpty(positive)) {
|
||||||
|
positiveBn.setText(positive);
|
||||||
|
} else {
|
||||||
|
positiveBn.setText("确定");
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(negtive)) {
|
||||||
|
negtiveBn.setText(negtive);
|
||||||
|
} else {
|
||||||
|
negtiveBn.setText("取消");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (imageResId != -1) {
|
||||||
|
imageIv.setImageResource(imageResId);
|
||||||
|
imageIv.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
imageIv.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 只显示一个按钮的时候隐藏取消按钮,回掉只执行确定的事件
|
||||||
|
*/
|
||||||
|
if (isSingle) {
|
||||||
|
// columnLineView.setVisibility(View.GONE);
|
||||||
|
negtiveBn.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
negtiveBn.setVisibility(View.VISIBLE);
|
||||||
|
// columnLineView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show() {
|
||||||
|
super.show();
|
||||||
|
refreshView();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化界面控件
|
||||||
|
*/
|
||||||
|
private void initView() {
|
||||||
|
negtiveBn = findViewById(R.id.negtive);
|
||||||
|
positiveBn = findViewById(R.id.positive);
|
||||||
|
titleTv = findViewById(R.id.title);
|
||||||
|
messageTv = findViewById(R.id.message);
|
||||||
|
imageIv = findViewById(R.id.image);
|
||||||
|
// columnLineView = findViewById(R.id.column_line);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置确定取消按钮的回调
|
||||||
|
*/
|
||||||
|
private OnClickBottomListener onClickBottomListener;
|
||||||
|
|
||||||
|
public void setOnClickBottomListener(OnClickBottomListener onClickBottomListener) {
|
||||||
|
this.onClickBottomListener = onClickBottomListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnClickBottomListener {
|
||||||
|
/**
|
||||||
|
* 点击确定按钮事件
|
||||||
|
*/
|
||||||
|
void onPositiveClick();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击取消按钮事件
|
||||||
|
*/
|
||||||
|
void onNegtiveClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositive() {
|
||||||
|
return positive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setPositive(String positive) {
|
||||||
|
this.positive = positive;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNegtive() {
|
||||||
|
return negtive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setNegtive(String negtive) {
|
||||||
|
this.negtive = negtive;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setNegtiveText(String negtive) {
|
||||||
|
negtiveBn.setText(negtive);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getImageResId() {
|
||||||
|
return imageResId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingle() {
|
||||||
|
return isSingle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setSingle(boolean single) {
|
||||||
|
isSingle = single;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDialog setImageResId(int imageResId) {
|
||||||
|
this.imageResId = imageResId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dismiss() {
|
||||||
|
super.dismiss();
|
||||||
|
// Intent intent = new Intent(mContext, MainActivity.class);
|
||||||
|
// intent.setAction(MainActivity.REFRESHACTION);
|
||||||
|
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
// mContext.startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -101,6 +101,7 @@ import com.aoleyun.sn.network.api.post.SendDownloadTimesApi;
|
|||||||
import com.aoleyun.sn.network.api.post.SendRestoreTimesApi;
|
import com.aoleyun.sn.network.api.post.SendRestoreTimesApi;
|
||||||
import com.aoleyun.sn.network.api.post.SendScreenshotApi;
|
import com.aoleyun.sn.network.api.post.SendScreenshotApi;
|
||||||
import com.aoleyun.sn.network.api.post.SendScreenshotCall;
|
import com.aoleyun.sn.network.api.post.SendScreenshotCall;
|
||||||
|
import com.aoleyun.sn.network.api.post.SnConfirmBindApi;
|
||||||
import com.aoleyun.sn.network.api.post.StudentsInfoApi;
|
import com.aoleyun.sn.network.api.post.StudentsInfoApi;
|
||||||
import com.aoleyun.sn.network.api.post.SystemSettingApi;
|
import com.aoleyun.sn.network.api.post.SystemSettingApi;
|
||||||
import com.aoleyun.sn.network.api.post.UpdateDeviceInfoApi;
|
import com.aoleyun.sn.network.api.post.UpdateDeviceInfoApi;
|
||||||
@@ -669,6 +670,8 @@ public class NetInterfaceManager {
|
|||||||
.observeOn(AndroidSchedulers.mainThread());
|
.observeOn(AndroidSchedulers.mainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* API
|
* API
|
||||||
@@ -751,6 +754,10 @@ public class NetInterfaceManager {
|
|||||||
return mRetrofit.create(BatteryInfoApi.class);
|
return mRetrofit.create(BatteryInfoApi.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SnConfirmBindApi getSnConfirmBindApi() {
|
||||||
|
return mRetrofit.create(SnConfirmBindApi.class);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* execution
|
* execution
|
||||||
@@ -1241,8 +1248,12 @@ public class NetInterfaceManager {
|
|||||||
cacheHelper.put(UrlAddress.GET_DESKTOP, "");
|
cacheHelper.put(UrlAddress.GET_DESKTOP, "");
|
||||||
// String whiteList = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
// String whiteList = Settings.System.getString(mContext.getContentResolver(), JGYActions.ACTION_JGY_SHORTCUTLIST);
|
||||||
for (String s : ApkUtils.desktopAPP) {
|
for (String s : ApkUtils.desktopAPP) {
|
||||||
if (!BuildConfig.DEBUG)
|
if ("com.aoleyunos.dop3".equals(s)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
ApkUtils.UninstallAPP(mContext, s);
|
ApkUtils.UninstallAPP(mContext, s);
|
||||||
|
}
|
||||||
Log.e("getDefaultDesktop", "UninstallAPP: " + s);
|
Log.e("getDefaultDesktop", "UninstallAPP: " + s);
|
||||||
}
|
}
|
||||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform) {
|
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform) {
|
||||||
@@ -1823,50 +1834,69 @@ public class NetInterfaceManager {
|
|||||||
getSystemSettingObservable()
|
getSystemSettingObservable()
|
||||||
.observeOn(Schedulers.io())
|
.observeOn(Schedulers.io())
|
||||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||||
.subscribe(new Observer<BaseResponse>() {
|
.subscribe(setSystemSettingObserver(callback));
|
||||||
@Override
|
}
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
|
||||||
Log.e("setSystemSetting", "onSubscribe: ");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
public void setSystemSetting(BehaviorSubject<ActivityEvent> lifecycle) {
|
||||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
getSystemSettingObservable()
|
||||||
Log.e("setSystemSetting", "onNext: " + baseResponse);
|
.observeOn(Schedulers.io())
|
||||||
SPUtils.put(mContext, CommonConfig.JGY_FIRST_CONNECT, 1);
|
.compose(RxLifecycle.bindUntilEvent(lifecycle, ActivityEvent.DESTROY))
|
||||||
if (baseResponse.code == OK) {
|
.subscribe(setSystemSettingObserver(null));
|
||||||
String data = GsonUtils.toJSONString(baseResponse.data);
|
}
|
||||||
Log.e("setSystemSetting", "onNext: " + data);
|
|
||||||
cacheHelper.put(UrlAddress.GET_FIRMWARE, data);
|
public void setSystemSetting() {
|
||||||
//结果保存到本地
|
getSystemSettingObservable()
|
||||||
JGYUtils.getInstance().SettingSysData(data);
|
.observeOn(Schedulers.io())
|
||||||
} else {
|
.subscribe(setSystemSettingObserver(null));
|
||||||
//没有数据全部关闭
|
}
|
||||||
|
|
||||||
|
public Observer<BaseResponse> setSystemSettingObserver(onCompleteCallback callback) {
|
||||||
|
return new Observer<BaseResponse>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
Log.e("setSystemSetting", "onSubscribe: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||||
|
Log.e("setSystemSetting", "onNext: " + baseResponse);
|
||||||
|
SPUtils.put(mContext, CommonConfig.JGY_FIRST_CONNECT, 1);
|
||||||
|
if (baseResponse.code == OK) {
|
||||||
|
String data = GsonUtils.toJSONString(baseResponse.data);
|
||||||
|
Log.e("setSystemSetting", "onNext: " + data);
|
||||||
|
cacheHelper.put(UrlAddress.GET_FIRMWARE, data);
|
||||||
|
//结果保存到本地
|
||||||
|
JGYUtils.getInstance().SettingSysData(data);
|
||||||
|
} else {
|
||||||
|
//没有数据全部关闭
|
||||||
// SysSettingUtils.setDisableSetting(mContext);
|
// SysSettingUtils.setDisableSetting(mContext);
|
||||||
// SPUtils.put(mContext, "SystemSettingData", "");
|
// SPUtils.put(mContext, "SystemSettingData", "");
|
||||||
JGYUtils.getInstance().SettingSysData("");
|
JGYUtils.getInstance().SettingSysData("");
|
||||||
cacheHelper.put(UrlAddress.GET_FIRMWARE, "");
|
cacheHelper.put(UrlAddress.GET_FIRMWARE, "");
|
||||||
//获取系统管控先不要关闭开发人员选项
|
//获取系统管控先不要关闭开发人员选项
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
Settings.System.putInt(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, 1);
|
Settings.System.putInt(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, 1);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
Log.e("setSystemSetting", "onError: " + e.getMessage());
|
Log.e("setSystemSetting", "onError: " + e.getMessage());
|
||||||
String oldData = (String) SPUtils.get(mContext, "SystemSettingData", "");
|
String oldData = (String) SPUtils.get(mContext, "SystemSettingData", "");
|
||||||
Log.e("setSystemSetting", "oldData: " + oldData);
|
Log.e("setSystemSetting", "oldData: " + oldData);
|
||||||
JGYUtils.getInstance().SettingSysData(oldData);
|
JGYUtils.getInstance().SettingSysData(oldData);
|
||||||
onComplete();
|
onComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
Log.e("setSystemSetting", "onComplete: ");
|
Log.e("setSystemSetting", "onComplete: ");
|
||||||
callback.onComplete();
|
if (callback != null) {
|
||||||
}
|
callback.onComplete();
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getEBagCode(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
public void getEBagCode(boolean refresh, BehaviorSubject<ActivityEvent> lifecycle, onCompleteCallback callback) {
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ public class UrlAddress {
|
|||||||
public static final String GET_DEVICES_LOCKED = "lock/index";
|
public static final String GET_DEVICES_LOCKED = "lock/index";
|
||||||
/*获取设备标签*/
|
/*获取设备标签*/
|
||||||
public static final String GET_DEVICES_TAGS = "Sn/getSnTag";
|
public static final String GET_DEVICES_TAGS = "Sn/getSnTag";
|
||||||
|
/*绑定设备*/
|
||||||
|
public static final String SN_CONFIRM_BIND = "And/sn/snConfirmBind";
|
||||||
|
|
||||||
|
|
||||||
/*获取批次*/
|
/*获取批次*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.aoleyun.sn.network.api.post;
|
||||||
|
|
||||||
|
import com.aoleyun.sn.bean.BaseResponse;
|
||||||
|
import com.aoleyun.sn.network.UrlAddress;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.Field;
|
||||||
|
import retrofit2.http.FormUrlEncoded;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface SnConfirmBindApi {
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(UrlAddress.SN_CONFIRM_BIND)
|
||||||
|
Observable<BaseResponse> snConfirmBind(
|
||||||
|
@Field("sn") String sn,
|
||||||
|
@Field("userId") String userId,
|
||||||
|
@Field("type") int type
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -19,8 +19,11 @@ import android.os.PowerManager;
|
|||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import com.aoleyun.sn.R;
|
import com.aoleyun.sn.R;
|
||||||
|
import com.aoleyun.sn.activity.main.MainActivity;
|
||||||
import com.aoleyun.sn.bean.BaseResponse;
|
import com.aoleyun.sn.bean.BaseResponse;
|
||||||
import com.aoleyun.sn.bean.BatteryInfo;
|
import com.aoleyun.sn.bean.BatteryInfo;
|
||||||
import com.aoleyun.sn.bean.DownloadInfo;
|
import com.aoleyun.sn.bean.DownloadInfo;
|
||||||
@@ -28,6 +31,7 @@ import com.aoleyun.sn.bean.RemoteDebug;
|
|||||||
import com.aoleyun.sn.bean.ScreenLockState;
|
import com.aoleyun.sn.bean.ScreenLockState;
|
||||||
import com.aoleyun.sn.comm.CommonConfig;
|
import com.aoleyun.sn.comm.CommonConfig;
|
||||||
import com.aoleyun.sn.comm.JGYActions;
|
import com.aoleyun.sn.comm.JGYActions;
|
||||||
|
import com.aoleyun.sn.dialog.CustomDialog;
|
||||||
import com.aoleyun.sn.disklrucache.CacheHelper;
|
import com.aoleyun.sn.disklrucache.CacheHelper;
|
||||||
import com.aoleyun.sn.gson.GsonUtils;
|
import com.aoleyun.sn.gson.GsonUtils;
|
||||||
import com.aoleyun.sn.gson.NullStringToEmptyAdapterFactory;
|
import com.aoleyun.sn.gson.NullStringToEmptyAdapterFactory;
|
||||||
@@ -67,13 +71,16 @@ import java.util.HashMap;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||||
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
import io.reactivex.rxjava3.core.Observable;
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
import io.reactivex.rxjava3.core.ObservableEmitter;
|
import io.reactivex.rxjava3.core.ObservableEmitter;
|
||||||
import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
import io.reactivex.rxjava3.core.ObservableOnSubscribe;
|
||||||
import io.reactivex.rxjava3.core.Observer;
|
import io.reactivex.rxjava3.core.Observer;
|
||||||
import io.reactivex.rxjava3.disposables.Disposable;
|
import io.reactivex.rxjava3.disposables.Disposable;
|
||||||
|
import io.reactivex.rxjava3.functions.Consumer;
|
||||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||||
import okhttp3.MediaType;
|
import okhttp3.MediaType;
|
||||||
import okhttp3.MultipartBody;
|
import okhttp3.MultipartBody;
|
||||||
@@ -84,6 +91,8 @@ import retrofit2.Response;
|
|||||||
public class PushManager {
|
public class PushManager {
|
||||||
private static final String TAG = PushManager.class.getSimpleName();
|
private static final String TAG = PushManager.class.getSimpleName();
|
||||||
|
|
||||||
|
public static final String ACTION_REFRESH_BINDING_STATUS = "RefreshBindingStatus";
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("StaticFieldLeak")
|
@SuppressLint("StaticFieldLeak")
|
||||||
private static PushManager sInstance;
|
private static PushManager sInstance;
|
||||||
@@ -212,10 +221,30 @@ public class PushManager {
|
|||||||
private static final String TAKE_FRONT_PICTURE = "58";
|
private static final String TAKE_FRONT_PICTURE = "58";
|
||||||
/*时间管控*/
|
/*时间管控*/
|
||||||
private static final String TIME_CONTROL2 = "59";
|
private static final String TIME_CONTROL2 = "59";
|
||||||
|
/*应用安装总开关*/
|
||||||
|
private static final String INSTALL_CONTROL = "60";
|
||||||
/*usb传输*/
|
/*usb传输*/
|
||||||
private static final String USB_CONTROL = "61";
|
private static final String USB_CONTROL = "61";
|
||||||
/*专注模式*/
|
/*专注模式*/
|
||||||
private static final String FOCUS_MODE = "62";
|
private static final String FOCUS_MODE = "62";
|
||||||
|
/*修改锁屏密码*/
|
||||||
|
private static final String CHANGE_LOCKED_PASSWD = "63";
|
||||||
|
/*蓝牙传输管控*/
|
||||||
|
private static final String BLUETOOTH_CONTROL = "64";
|
||||||
|
/*开发者选项*/
|
||||||
|
private static final String DEVELOPER_CONTROL = "65";
|
||||||
|
/*恢复出厂模式*/
|
||||||
|
private static final String FACTORY_CONTROL = "66";
|
||||||
|
/*通知栏开关*/
|
||||||
|
private static final String SETTING_STATUSBAR = "67";
|
||||||
|
/*导航栏管控*/
|
||||||
|
private static final String SETTING_NAVIGATION = "68";
|
||||||
|
/*存储卡管控*/
|
||||||
|
private static final String SETTING_TF_CARD = "69";
|
||||||
|
|
||||||
|
/*绑定设备*/
|
||||||
|
private static final String BIND_DEVICE = "71";
|
||||||
|
|
||||||
|
|
||||||
public void setPushContent(String title, String extras) {
|
public void setPushContent(String title, String extras) {
|
||||||
switch (title) {
|
switch (title) {
|
||||||
@@ -597,6 +626,18 @@ public class PushManager {
|
|||||||
case FOCUS_MODE:
|
case FOCUS_MODE:
|
||||||
refreshFocusMode();
|
refreshFocusMode();
|
||||||
break;
|
break;
|
||||||
|
case INSTALL_CONTROL:
|
||||||
|
case BLUETOOTH_CONTROL:
|
||||||
|
case DEVELOPER_CONTROL:
|
||||||
|
case FACTORY_CONTROL:
|
||||||
|
case SETTING_STATUSBAR:
|
||||||
|
case SETTING_NAVIGATION:
|
||||||
|
case SETTING_TF_CARD:
|
||||||
|
NetInterfaceManager.getInstance().setSystemSetting();
|
||||||
|
break;
|
||||||
|
case BIND_DEVICE:
|
||||||
|
bindService(extras);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1269,4 +1310,130 @@ public class PushManager {
|
|||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Disposable subscribe;
|
||||||
|
private long cutdownTime = 30;
|
||||||
|
private CustomDialog dialog;
|
||||||
|
|
||||||
|
void bindService(final String jsonString) {
|
||||||
|
ToastUtil.betaShow("收到绑定设备请求");
|
||||||
|
JsonObject object = GsonUtils.getJsonObject(jsonString);
|
||||||
|
// String userName = object.get("member_name").getAsString();
|
||||||
|
final String id = object.get("userId").getAsString();
|
||||||
|
String phoneNum = object.get("mobile").getAsString();
|
||||||
|
if (dialog == null) {
|
||||||
|
dialog = new CustomDialog(mContext);
|
||||||
|
subscribe = Observable.interval(1, TimeUnit.SECONDS)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<Long>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Long aLong) throws Exception {
|
||||||
|
// Log.e("TAG", "倒计时:" + aLong);
|
||||||
|
if (aLong < cutdownTime && !subscribe.isDisposed()) {
|
||||||
|
dialog.setNegtiveText("拒绝" + "(" + (cutdownTime - aLong) + ")");
|
||||||
|
} else {
|
||||||
|
bind(id, 0);
|
||||||
|
dialog.dismiss();
|
||||||
|
dialog = null;
|
||||||
|
subscribe.dispose();
|
||||||
|
subscribe = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog.setMessage(phoneNum + "请求绑定你的设备")
|
||||||
|
.setTitle("设备绑定请求")
|
||||||
|
.setPositive("允许")
|
||||||
|
.setNegtive("拒绝")
|
||||||
|
// .setSingle(true)
|
||||||
|
.setOnClickBottomListener(new CustomDialog.OnClickBottomListener() {
|
||||||
|
@Override
|
||||||
|
public void onPositiveClick() {
|
||||||
|
bind(id, 1);
|
||||||
|
dialog.dismiss();
|
||||||
|
dialog = null;
|
||||||
|
subscribe.dispose();
|
||||||
|
subscribe = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNegtiveClick() {
|
||||||
|
bind(id, 2);
|
||||||
|
ToastUtil.show("设备取消绑定");
|
||||||
|
dialog.dismiss();
|
||||||
|
dialog = null;
|
||||||
|
subscribe.dispose();
|
||||||
|
subscribe = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
|
||||||
|
dialog.show();
|
||||||
|
dialog.getWindow().setGravity(Gravity.CENTER);
|
||||||
|
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||||
|
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// new CountDownTimer(30000, 1000) {
|
||||||
|
// @Override
|
||||||
|
// public void onTick(long l) {
|
||||||
|
// String value = String.valueOf((int) (l / 1000));
|
||||||
|
// dialog_info.setNegtiveText("拒绝" + "(" + value + ")");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void onFinish() {
|
||||||
|
// bind(context, id, 0);
|
||||||
|
// dialog_info.dismiss();
|
||||||
|
// }
|
||||||
|
// }.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bind(final String id, int type) {
|
||||||
|
NetInterfaceManager.getInstance()
|
||||||
|
.getSnConfirmBindApi()
|
||||||
|
.snConfirmBind(Utils.getSerial(mContext), id, type)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Observer<BaseResponse>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
Log.e("bind", "onSubscribe: ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||||
|
int code = baseResponse.code;
|
||||||
|
Log.e("bind", "onNext: " + baseResponse);
|
||||||
|
String msg = baseResponse.msg;
|
||||||
|
// Log.e("bind", baseResponse.toString());
|
||||||
|
if (code == 200) {
|
||||||
|
ToastUtil.show("绑定成功");
|
||||||
|
sendRefreshIntent();
|
||||||
|
} else if (code == 301) {
|
||||||
|
ToastUtil.show(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NonNull Throwable e) {
|
||||||
|
Log.e("bind", "onError: " + e.getMessage());
|
||||||
|
onComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onComplete() {
|
||||||
|
Log.e("bind", "onComplete: ");
|
||||||
|
// NetInterfaceManager.getInstance().getSnInfo();
|
||||||
|
Intent serviceIntent = new Intent(MainService.RefreshReceiver.REFRESH_RECEIVER_ACTION);
|
||||||
|
mContext.sendBroadcast(serviceIntent);
|
||||||
|
Intent activityIntent = new Intent(MainActivity.REFRESHACTION);
|
||||||
|
mContext.sendBroadcast(activityIntent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendRefreshIntent() {
|
||||||
|
Intent intent = new Intent(ACTION_REFRESH_BINDING_STATUS);
|
||||||
|
intent.setPackage("com.teclast.zyos");
|
||||||
|
mContext.sendBroadcast(intent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,8 +399,8 @@ public class SysSettingUtils {
|
|||||||
|
|
||||||
//状态栏显示开关
|
//状态栏显示开关
|
||||||
int setting_statusbar = changeNum(jsonObject.get("setting_statusbar").getAsInt());
|
int setting_statusbar = changeNum(jsonObject.get("setting_statusbar").getAsInt());
|
||||||
int oldNum = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, 0);
|
// int oldNum = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, 0);
|
||||||
if (oldNum != setting_statusbar) {
|
// if (oldNum != setting_statusbar) {
|
||||||
//写入到系统不涉及任何管控,因为之前调用会频繁隐藏显示
|
//写入到系统不涉及任何管控,因为之前调用会频繁隐藏显示
|
||||||
boolean aole_hide_statusBar = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, setting_statusbar);
|
boolean aole_hide_statusBar = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, setting_statusbar);
|
||||||
Log.e(TAG, "aole_hide_statusBar: " + aole_hide_statusBar);
|
Log.e(TAG, "aole_hide_statusBar: " + aole_hide_statusBar);
|
||||||
@@ -417,7 +417,7 @@ public class SysSettingUtils {
|
|||||||
Intent statusIntent = new Intent(statusbarStatus);
|
Intent statusIntent = new Intent(statusbarStatus);
|
||||||
// Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
// Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
|
||||||
context.sendBroadcast(statusIntent);
|
context.sendBroadcast(statusIntent);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setCamera(Context context, int state) {
|
private static void setCamera(Context context, int state) {
|
||||||
|
|||||||
@@ -682,6 +682,19 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bind_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:text="绑定状态"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_bind"
|
android:id="@+id/cl_bind"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -727,6 +727,19 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bind_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:text="绑定状态"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_bind"
|
android:id="@+id/cl_bind"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
115
app/src/main/res/layout/dialog_custom.xml
Normal file
115
app/src/main/res/layout/dialog_custom.xml
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="@dimen/dp_240"
|
||||||
|
android:layout_height="@dimen/dp_160"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:background="@drawable/bg_dialog"
|
||||||
|
android:minWidth="@dimen/dp_240"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:maxWidth="80dp"
|
||||||
|
android:maxHeight="80dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="visible"
|
||||||
|
tools:text="消息提示" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/message"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lineSpacingExtra="3dp"
|
||||||
|
android:lineSpacingMultiplier="1.2"
|
||||||
|
android:minHeight="50dp"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="提示消息提示消息提示消息提示消息提示消息" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/linearLayout3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/negtive"
|
||||||
|
android:layout_width="@dimen/dp_48"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="@dimen/dp_32"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/joined_background"
|
||||||
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_8"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:text="取消" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/positive"
|
||||||
|
android:layout_width="@dimen/dp_48"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_32"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/join_background"
|
||||||
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_8"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0"
|
||||||
|
tools:text="确定" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user