优化
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
android:name="com.ckkj.water.login.LoginActivity"
|
||||
android:theme="@style/AppTheme.FullScreen"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"/>
|
||||
android:windowSoftInputMode="adjustPan"/>
|
||||
<activity
|
||||
android:name="com.ckkj.water.mine.WebviewUserAgreement"
|
||||
android:screenOrientation="portrait"
|
||||
|
||||
@@ -113,9 +113,9 @@ public class AppConfig {
|
||||
//测试使用 token
|
||||
public static String TEST_USER_ID = "1897194667309666304";
|
||||
//用户协议
|
||||
public static String USER_AGREEMENT = "https://sta.mingdengbazi.site/yhxy.html";
|
||||
public static String USER_AGREEMENT = "http://47.97.217.123/user-agreement";
|
||||
//隐私政策
|
||||
public static String USER_PRIVACY = "https://sta.mingdengbazi.site/ysxy.html";
|
||||
public static String USER_PRIVACY = "http://47.97.217.123/privacy";
|
||||
//用户分享链接
|
||||
public static String USER_SHARE_URL = "https://sta.mingdengbazi.site/on/index.html?code=";
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ public class AddDeviceActivity extends BaseActivity<AddDeviceLayoutBinding, Devi
|
||||
ToastUtil.showShort(mContext, "扫描失败,错误码: " + errorCode);
|
||||
}
|
||||
};
|
||||
scanner.startScan(filters, settings, mScanCallback);
|
||||
scanner.startScan(null, settings, mScanCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -196,6 +196,8 @@ public class DeviceConnectActivity extends BaseActivity<DeviceConnectLayoutBindi
|
||||
espProvisionManager.disconnect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Intent intent = new Intent(this, AddDeviceActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
startActivity(intent);
|
||||
|
||||
@@ -61,27 +61,7 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
showLoadingDialog();
|
||||
mPresenter.getDeviceDetailInfo(mDeviceEntity.getDeviceNo());
|
||||
viewBinding.includedTitle.tvTitle.setText(mDeviceEntity.getDeviceName());
|
||||
if(mDeviceEntity.getStatus().equals("1") || mDeviceEntity.getStatus().equals("2")){
|
||||
if(mDeviceEntity.getWorkStatus().equals("1")){
|
||||
viewBinding.tvDeviceStatus.setText(getString(R.string.device_status_working));
|
||||
viewBinding.tvDeviceStatus.setTextColor(mContext.getResources().getColor(R.color.color_zhu));
|
||||
viewBinding.tvConfirm.setText(getString(R.string.device_control_stop));
|
||||
}else{
|
||||
viewBinding.tvDeviceStatus.setText(getString(R.string.device_status_not_working));
|
||||
viewBinding.tvDeviceStatus.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
||||
viewBinding.tvConfirm.setText(getString(R.string.device_control_start));
|
||||
}
|
||||
viewBinding.linearWifi.setBackground(mContext.getResources().getDrawable(R.drawable.shape_device_ctrl_green_cor12));
|
||||
viewBinding.imgWifiLogo.setImageResource(R.mipmap.icon_ctrl_wifi_white);
|
||||
}else{
|
||||
viewBinding.tvDeviceStatus.setText(getString(R.string.device_status_offline));
|
||||
viewBinding.tvDeviceStatus.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
||||
viewBinding.tvConfirm.setEnabled(false);
|
||||
viewBinding.tvConfirm.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
||||
viewBinding.tvConfirm.setBackgroundResource((R.drawable.shape_gray_button_bg_enable));
|
||||
viewBinding.linearWifi.setBackground(mContext.getResources().getDrawable(R.drawable.shape_device_ctrl_white_cor12));
|
||||
viewBinding.imgWifiLogo.setImageResource(R.mipmap.icon_ctrl_wifi_green);
|
||||
}
|
||||
updateDeviceStatus(mDeviceEntity);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -110,6 +90,11 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
mAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
||||
//此时处于工作中,不可点击
|
||||
if(mDeviceEntity.getWorkStatus().equals("1")){
|
||||
ToastUtil.showShort(mContext,"当前设备处于工作中,请先关闭浇水任务");
|
||||
return;
|
||||
}
|
||||
mAdapter.setOnSelPosition(position);
|
||||
mCustomDuration = 0;
|
||||
viewBinding.tvWorkDuartion.setHint(getString(R.string.device_custom_work_time));
|
||||
@@ -124,6 +109,30 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
initListener();
|
||||
}
|
||||
|
||||
private void updateDeviceStatus(WaterDeviceEntity entity) {
|
||||
if(entity.getStatus().equals("1") || entity.getStatus().equals("2")){
|
||||
if(entity.getWorkStatus().equals("1")){
|
||||
viewBinding.tvDeviceStatus.setText(getString(R.string.device_status_working));
|
||||
viewBinding.tvDeviceStatus.setTextColor(mContext.getResources().getColor(R.color.color_zhu));
|
||||
viewBinding.tvConfirm.setText(getString(R.string.device_control_stop));
|
||||
}else{
|
||||
viewBinding.tvDeviceStatus.setText(getString(R.string.device_status_not_working));
|
||||
viewBinding.tvDeviceStatus.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
||||
viewBinding.tvConfirm.setText(getString(R.string.device_control_start));
|
||||
}
|
||||
viewBinding.linearWifi.setBackground(mContext.getResources().getDrawable(R.drawable.shape_device_ctrl_green_cor12));
|
||||
viewBinding.imgWifiLogo.setImageResource(R.mipmap.icon_ctrl_wifi_white);
|
||||
}else{
|
||||
viewBinding.tvDeviceStatus.setText(getString(R.string.device_status_offline));
|
||||
viewBinding.tvDeviceStatus.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
||||
viewBinding.tvConfirm.setEnabled(false);
|
||||
viewBinding.tvConfirm.setTextColor(mContext.getResources().getColor(R.color.color_999999));
|
||||
viewBinding.tvConfirm.setBackgroundResource((R.drawable.shape_gray_button_bg_enable));
|
||||
viewBinding.linearWifi.setBackground(mContext.getResources().getDrawable(R.drawable.shape_device_ctrl_white_cor12));
|
||||
viewBinding.imgWifiLogo.setImageResource(R.mipmap.icon_ctrl_wifi_green);
|
||||
}
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
setClick(viewBinding.includedTitle.imgBack);
|
||||
setClick(viewBinding.includedTitle.imgSetting);
|
||||
@@ -185,6 +194,11 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
break;
|
||||
|
||||
case R.id.tv_work_duartion:
|
||||
//此时处于工作中,不可点击
|
||||
if(mDeviceEntity.getWorkStatus().equals("1")){
|
||||
ToastUtil.showShort(mContext,"当前设备处于工作中,请先关闭浇水任务");
|
||||
return;
|
||||
}
|
||||
inputDuration(mCustomDuration);
|
||||
break;
|
||||
|
||||
@@ -345,7 +359,8 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
hideDialogLoading();
|
||||
viewBinding.imgBatStatus.setImageResource(PowerIconManage.getInstance().
|
||||
getPowerVerIcon(Integer.parseInt(bean.getPowerLevel())));
|
||||
mRemoteDeviceEntity = bean;
|
||||
mDeviceEntity = bean;
|
||||
updateDeviceStatus( bean);
|
||||
}
|
||||
|
||||
|
||||
@@ -368,6 +383,8 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
showCenterTipDialog(R.mipmap.icon_dialog_success,getString(R.string.start_watering));
|
||||
viewBinding.tvConfirm.setText(getString(R.string.end_watering));
|
||||
}
|
||||
//开关设备之后,更新一下当前设备状态
|
||||
mPresenter.getDeviceDetailInfo(mDeviceEntity.getDeviceNo());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,12 @@ package com.ckkj.water.login;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
@@ -23,6 +27,10 @@ import com.gyf.immersionbar.ImmersionBar;
|
||||
*/
|
||||
public class ForgetPasswordActivity extends BaseActivity<RegisterLayoutBinding, LoginPresenter>
|
||||
implements LoginContract.LoginView {
|
||||
|
||||
private boolean isPasswordVisible = false;
|
||||
private boolean isConfirmPasswordVisible = false;
|
||||
|
||||
@Override
|
||||
public LoginPresenter createPresenter() {
|
||||
return new LoginPresenter(new LoginImpl());
|
||||
@@ -50,6 +58,8 @@ public class ForgetPasswordActivity extends BaseActivity<RegisterLayoutBinding,
|
||||
setClick(viewBinding.includedTitle.imgBack);
|
||||
setClick(viewBinding.tvGetVerifiCode);
|
||||
setClick(viewBinding.tvCommit);
|
||||
setClick(viewBinding.imgPsdShowHide);
|
||||
setClick(viewBinding.imgPsdShowHideAgin);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
@@ -111,9 +121,37 @@ public class ForgetPasswordActivity extends BaseActivity<RegisterLayoutBinding,
|
||||
viewBinding.etVerfiCode.getText().toString(),
|
||||
viewBinding.etInputPsd.getText().toString());
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide:
|
||||
togglePasswordVisibility(viewBinding.etInputPsd, viewBinding.imgPsdShowHide, isPasswordVisible);
|
||||
isPasswordVisible = !isPasswordVisible;
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide_agin:
|
||||
togglePasswordVisibility(viewBinding.etInputPsdAgin, viewBinding.imgPsdShowHideAgin, isConfirmPasswordVisible);
|
||||
isConfirmPasswordVisible = !isConfirmPasswordVisible;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void togglePasswordVisibility(EditText editText, ImageView imageView, boolean isVisible) {
|
||||
if (editText == null || imageView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isVisible) {
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
imageView.setImageResource(R.mipmap.icon_psd_hide);
|
||||
} else {
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
|
||||
editText.setTransformationMethod(null);
|
||||
imageView.setImageResource(R.mipmap.icon_psd_show);
|
||||
}
|
||||
|
||||
editText.setSelection(editText.getText().length());
|
||||
}
|
||||
|
||||
|
||||
private CountDownTimer cdTimer = new CountDownTimer(6000, 1000) {
|
||||
@Override
|
||||
|
||||
@@ -10,18 +10,23 @@ import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.InputType;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.ckkj.water.mine.WebviewUserAgreement;
|
||||
import com.ckkj.water.utils.manager.LanguageManager;
|
||||
import com.google.gson.Gson;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
@@ -49,6 +54,7 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
implements LoginContract.LoginView {
|
||||
|
||||
private boolean mYinsiConfirm = false;
|
||||
private boolean isPasswordVisible = false;
|
||||
//当前登录方式 验证码100 密码 200
|
||||
private static int LOGIN_TYPE_STATUS_CODE = 100;
|
||||
|
||||
@@ -80,6 +86,7 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
setClick(viewBinding.tvLanguage);
|
||||
setClick(viewBinding.tvResetPsd);
|
||||
setClick(viewBinding.checkboxRead);
|
||||
setClick(viewBinding.imgPsdShowHide);
|
||||
setClick(viewBinding.btn133);
|
||||
setClick(viewBinding.btn151);
|
||||
}
|
||||
@@ -106,7 +113,10 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
content,
|
||||
userAgreementText,
|
||||
() -> {
|
||||
ToastUtil.showShort(mContext, "用户协议");
|
||||
// 跳转用户协议
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("from_requse_code", WebviewUserAgreement.AGREEMENT_CODE);
|
||||
goToWihoutNoPresent(mContext, WebviewUserAgreement.class,bundle);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -115,7 +125,10 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
content,
|
||||
privacyPolicyText,
|
||||
() -> {
|
||||
ToastUtil.showShort(mContext, "隐私政策");
|
||||
// 跳转隐私政策
|
||||
Bundle bundleYS = new Bundle();
|
||||
bundleYS.putInt("from_requse_code",WebviewUserAgreement.PRIVACY_CODE);
|
||||
goToWihoutNoPresent(mContext, WebviewUserAgreement.class,bundleYS);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -271,15 +284,6 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
goTo(mContext, ForgetPasswordActivity.class,null);
|
||||
break;
|
||||
|
||||
// case R.id.checkbox_read:
|
||||
// if (mYinsiConfirm) {
|
||||
// mYinsiConfirm = false;
|
||||
// viewBinding.checkboxRead.setChecked(false);
|
||||
// } else {
|
||||
// mYinsiConfirm = true;
|
||||
// viewBinding.checkboxRead.setChecked(true);
|
||||
// }
|
||||
// break;
|
||||
case R.id.tv_login:
|
||||
if (TextUtils.isEmpty(viewBinding.etAccount.getText().toString())) {
|
||||
ToastUtil.showShort(mContext, getString(R.string.login_error_phone_empty));
|
||||
@@ -309,10 +313,10 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
}
|
||||
}
|
||||
|
||||
// if (!mYinsiConfirm) {
|
||||
// ToastUtil.showShort(mContext, getString(R.string.login_error_agreement));
|
||||
// return;
|
||||
// }
|
||||
if (!mYinsiConfirm) {
|
||||
ToastUtil.showShort(mContext, getString(R.string.login_error_agreement));
|
||||
return;
|
||||
}
|
||||
|
||||
showLoadingDialog();
|
||||
mPresenter.loginBySmsCode(loginType,
|
||||
@@ -322,6 +326,10 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
// new Handler().postDelayed(() -> hideDialogLoading(), 1000);
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide:
|
||||
togglePasswordVisibility();
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -346,6 +354,31 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
}
|
||||
};
|
||||
|
||||
private void togglePasswordVisibility() {
|
||||
EditText etPassword = viewBinding.etInputPsd;
|
||||
ImageView ivToggle = viewBinding.imgPsdShowHide;
|
||||
|
||||
if (etPassword == null || ivToggle == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isPasswordVisible) {
|
||||
// 隐藏密码
|
||||
etPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
etPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
ivToggle.setImageResource(R.mipmap.icon_psd_hide);
|
||||
} else {
|
||||
// 显示密码
|
||||
etPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
|
||||
etPassword.setTransformationMethod(null);
|
||||
ivToggle.setImageResource(R.mipmap.icon_psd_show);
|
||||
}
|
||||
|
||||
// 保持光标位置
|
||||
etPassword.setSelection(etPassword.getText().length());
|
||||
isPasswordVisible = !isPasswordVisible;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerSuccess(BaseBean bean) {
|
||||
|
||||
|
||||
@@ -2,8 +2,12 @@ package com.ckkj.water.login;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
@@ -23,6 +27,10 @@ import me.jessyan.autosize.internal.CustomAdapt;
|
||||
|
||||
public class RegisterActivity extends BaseActivity<RegisterLayoutBinding, LoginPresenter>
|
||||
implements LoginContract.LoginView {
|
||||
|
||||
private boolean isPasswordVisible = false;
|
||||
private boolean isConfirmPasswordVisible = false;
|
||||
|
||||
@Override
|
||||
public LoginPresenter createPresenter() {
|
||||
return new LoginPresenter(new LoginImpl());
|
||||
@@ -49,6 +57,8 @@ public class RegisterActivity extends BaseActivity<RegisterLayoutBinding, LoginP
|
||||
setClick(viewBinding.includedTitle.imgBack);
|
||||
setClick(viewBinding.tvGetVerifiCode);
|
||||
setClick(viewBinding.tvCommit);
|
||||
setClick(viewBinding.imgPsdShowHide);
|
||||
setClick(viewBinding.imgPsdShowHideAgin);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
@@ -121,6 +131,16 @@ public class RegisterActivity extends BaseActivity<RegisterLayoutBinding, LoginP
|
||||
viewBinding.etVerfiCode.getText().toString(),
|
||||
viewBinding.etInputPsd.getText().toString());
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide:
|
||||
togglePasswordVisibility(viewBinding.etInputPsd, viewBinding.imgPsdShowHide, isPasswordVisible);
|
||||
isPasswordVisible = !isPasswordVisible;
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide_agin:
|
||||
togglePasswordVisibility(viewBinding.etInputPsdAgin, viewBinding.imgPsdShowHideAgin, isConfirmPasswordVisible);
|
||||
isConfirmPasswordVisible = !isConfirmPasswordVisible;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +166,24 @@ public class RegisterActivity extends BaseActivity<RegisterLayoutBinding, LoginP
|
||||
};
|
||||
|
||||
|
||||
private void togglePasswordVisibility(EditText editText, ImageView imageView, boolean isVisible) {
|
||||
if (editText == null || imageView == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isVisible) {
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
imageView.setImageResource(R.mipmap.icon_psd_hide);
|
||||
} else {
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
|
||||
editText.setTransformationMethod(null);
|
||||
imageView.setImageResource(R.mipmap.icon_psd_show);
|
||||
}
|
||||
|
||||
editText.setSelection(editText.getText().length());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerSuccess(BaseBean bean) {
|
||||
hideDialogLoading();
|
||||
|
||||
@@ -392,13 +392,18 @@ public class MainActivity extends BaseActivity<MainActivityLayoutBinding, MainPr
|
||||
public void callBackGetPermisson(String permission) {
|
||||
if (!hasRecordPermission(permission)) {
|
||||
if (Manifest.permission.POST_NOTIFICATIONS.equals(permission)) {
|
||||
getPermissionRequst(permission,"通知权限申请",
|
||||
"星语明灯需要通知权限来显示应用下载进度",POST_NOTIFICATIONS_PERMISSION_CODE);
|
||||
getPermissionRequst(permission,
|
||||
"通知权限申请",
|
||||
|
||||
"渥田氏需要通知权限来显示应用下载进度",
|
||||
POST_NOTIFICATIONS_PERMISSION_CODE);
|
||||
return;
|
||||
}
|
||||
// 没有权限,只在ACTION_DOWN时去申请
|
||||
getPermissionRequst(permission,"文件存储权限申请",
|
||||
"星语明灯需要您的授权,获取存储权限来更新您的应用",WRITE_FILE_PERMISSON_CPDE);
|
||||
getPermissionRequst(permission,
|
||||
"文件存储权限申请",
|
||||
"渥田氏需要您的授权,获取存储权限来更新您的应用",
|
||||
WRITE_FILE_PERMISSON_CPDE);
|
||||
}else{
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.view.View;
|
||||
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.databinding.AppThemeChangeLayoutBinding;
|
||||
import com.ckkj.water.mine.mvp.MineContract;
|
||||
@@ -127,4 +128,9 @@ public class AppThemActivity extends BaseActivity<AppThemeChangeLayoutBinding, M
|
||||
public void uploadImageSuccess(MineUserInfoBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.os.CountDownTimer;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.ckkj.water.R;
|
||||
@@ -155,4 +156,9 @@ public class ChangePhoneActivity extends BaseActivity<ChangePhoneActivityBinding
|
||||
public void uploadImageSuccess(MineUserInfoBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ckkj.water.mine;
|
||||
|
||||
import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
@@ -11,6 +12,7 @@ import com.ckkj.water.AppConfig;
|
||||
import com.ckkj.water.ConstantUtil;
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseFragment;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.databinding.MineFragmentLayoutBinding;
|
||||
import com.ckkj.water.login.LoginActivity;
|
||||
@@ -44,6 +46,7 @@ public class MineCenterFragment extends BaseFragment<MineFragmentLayoutBinding,
|
||||
.titleBar(viewBinding.rlTitle)
|
||||
.init();
|
||||
viewBinding.includedTitle.imgBack.setVisibility(INVISIBLE);
|
||||
viewBinding.includedTitle.imgSetting.setVisibility(VISIBLE);
|
||||
viewBinding.includedTitle.tvTitle.setText(getString(R.string.mine_center_title));
|
||||
initListener();
|
||||
}
|
||||
@@ -62,6 +65,7 @@ public class MineCenterFragment extends BaseFragment<MineFragmentLayoutBinding,
|
||||
setClick(viewBinding.linearPsdManage);
|
||||
setClick(viewBinding.linearTheme);
|
||||
setClick(viewBinding.btnDelete);
|
||||
setClick(viewBinding.includedTitle.imgSetting);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
@@ -70,6 +74,11 @@ public class MineCenterFragment extends BaseFragment<MineFragmentLayoutBinding,
|
||||
|
||||
public void onClick(View v){
|
||||
switch (v.getId()){
|
||||
|
||||
case R.id.img_setting:
|
||||
goTo(mContext, SettingsActivity.class,null);
|
||||
break;
|
||||
|
||||
case R.id.linear_info:
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(ConstantUtil.USER_INFO_JSON_CONTENT,mUserBean);
|
||||
@@ -169,6 +178,11 @@ public class MineCenterFragment extends BaseFragment<MineFragmentLayoutBinding,
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUserInfoSuccess(BaseBean bean) {
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.bumptech.glide.Glide;
|
||||
import com.ckkj.water.ConstantUtil;
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.databinding.MineInformationLayoutBinding;
|
||||
import com.ckkj.water.mine.mvp.MineContract;
|
||||
@@ -225,6 +226,11 @@ public class MineInfomationActivity extends BaseActivity<MineInformationLayoutBi
|
||||
ToastUtil.showShort(mContext, getString(R.string.avatar_update_success));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void getCompressFile(File file) {
|
||||
LubanCompressUtil.getInstance().getCompressFile(mContext, file, new LubanCompressUtil.CompressCallback() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.view.View;
|
||||
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.databinding.PasswordManLayoutBinding;
|
||||
import com.ckkj.water.login.ForgetPasswordActivity;
|
||||
@@ -106,4 +107,9 @@ public class PsdManageActivity extends BaseActivity<PasswordManLayoutBinding, Mi
|
||||
public void uploadImageSuccess(MineUserInfoBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.view.View;
|
||||
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.databinding.ResetPsdLayoutBinding;
|
||||
import com.ckkj.water.mine.mvp.MineContract;
|
||||
@@ -101,6 +102,11 @@ public class ResetPsdActivity extends BaseActivity<ResetPsdLayoutBinding, MinePr
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public MinePresenter createPresenter() {
|
||||
return new MinePresenter(new MineImpl());
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
package com.ckkj.water.mine;
|
||||
|
||||
import static com.ckkj.water.ConstantUtil.POST_NOTIFICATIONS_PERMISSION_CODE;
|
||||
import static com.ckkj.water.ConstantUtil.WRITE_FILE_PERMISSON_CPDE;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.ckkj.water.main.MainContract;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.utils.AppInfoUtil;
|
||||
import com.ckkj.water.utils.manager.ThemeManager;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.ckkj.water.AppConfig;
|
||||
import com.ckkj.water.EventMessage;
|
||||
@@ -24,9 +34,13 @@ import com.ckkj.water.utils.manager.ActivityManager;
|
||||
import com.ckkj.water.utils.manager.WaterUserInfoManager;
|
||||
import com.ckkj.water.utils.show.ToastUtil;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import de.greenrobot.event.EventBus;
|
||||
import pub.devrel.easypermissions.EasyPermissions;
|
||||
|
||||
/**
|
||||
* @author fengxiaoyang
|
||||
@@ -35,23 +49,21 @@ import de.greenrobot.event.EventBus;
|
||||
*/
|
||||
|
||||
public class SettingsActivity extends BaseActivity<ActivitySettingsLayoutBinding, MinePresenter>
|
||||
implements MineContract.MineView {
|
||||
implements MineContract.MineView, MainContract.MainView, EasyPermissions.PermissionCallbacks{
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(viewBinding.rlTitle) // 替换为你的标题栏View
|
||||
.keyboardEnable(true)
|
||||
.navigationBarDarkIcon(true)
|
||||
.statusBarDarkFont(ThemeManager.isAppThemeLight(mContext)) // 白色状态栏图标
|
||||
.navigationBarColor(R.color.color_gray_theme)
|
||||
.titleBar(viewBinding.rlTitle)
|
||||
.init();
|
||||
viewBinding.includeTitle.tvTitle.setText("设置");
|
||||
viewBinding.includeTitle.tvTitle.setText(R.string.settings_title);
|
||||
viewBinding.includeTitle.imgBack.setOnClickListener(c -> finish());
|
||||
if(AppConfig.USER_LOGIN){
|
||||
// viewBinding.tvUserPhone.setText(WaterUserInfoManager.getInstance().getUserInfo().getMobile());
|
||||
viewBinding.tvLogOut.setVisibility(View.VISIBLE);
|
||||
// viewBinding.tvLogOut.setVisibility(View.VISIBLE);
|
||||
}
|
||||
//获取本应用所占用的缓存
|
||||
displayCacheSize();
|
||||
@@ -62,12 +74,28 @@ public class SettingsActivity extends BaseActivity<ActivitySettingsLayoutBinding
|
||||
PackageInfo packageInfo = packageManager.getPackageInfo(mContext.getPackageName(), 0);
|
||||
// 获取版本名称
|
||||
String versionName = packageInfo.versionName;
|
||||
viewBinding.tvVersionName.setText("version " + versionName);
|
||||
viewBinding.tvVersionName.setText(versionName);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
initListener();
|
||||
}
|
||||
|
||||
|
||||
private void initListener() {
|
||||
setClick(viewBinding.rlCheckVersion);
|
||||
setClick(viewBinding.rlSetCache);
|
||||
setClick(viewBinding.rlUserAgreement);
|
||||
setClick(viewBinding.rlUserPrivacy);
|
||||
setClick(viewBinding.rlLogOff);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
view.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public MinePresenter createPresenter() {
|
||||
return new MinePresenter(new MineImpl());
|
||||
@@ -81,16 +109,11 @@ public class SettingsActivity extends BaseActivity<ActivitySettingsLayoutBinding
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()){
|
||||
|
||||
case R.id.rl_change_phone:
|
||||
goTo(mContext, ChangePhoneActivity.class,null);
|
||||
break;
|
||||
|
||||
case R.id.rl_check_version://版本检测
|
||||
//版本检测更新
|
||||
mPresenter.checkNewVersion();
|
||||
break;
|
||||
|
||||
case R.id.rl_commit_service:
|
||||
break;
|
||||
|
||||
case R.id.rl_set_cache:
|
||||
showLoadingDialog();
|
||||
@@ -105,26 +128,6 @@ public class SettingsActivity extends BaseActivity<ActivitySettingsLayoutBinding
|
||||
},800);
|
||||
break;
|
||||
|
||||
case R.id.tv_log_out:
|
||||
showDialogtext(mContext.getResources().getDrawable(R.mipmap.img_location), false, false,true,
|
||||
getString(R.string.tip_text),
|
||||
getString(R.string.logout_dialog_tips),
|
||||
getString(R.string.cancel_text),
|
||||
getString(R.string.confirm_text),
|
||||
new BaseFragment.OnDialogClick() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick() {
|
||||
WaterUserInfoManager.getInstance().clearUser(mContext);
|
||||
ActivityManager.removeAllActivity();
|
||||
goTo(mContext, LoginActivity.class,null);
|
||||
EventBus.getDefault().post(new EventMessage(EventMessage.USER_LOGIN_LOST));
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
case R.id.rl_user_agreement://用户协议
|
||||
Bundle bundle = new Bundle();
|
||||
@@ -229,4 +232,93 @@ public class SettingsActivity extends BaseActivity<ActivitySettingsLayoutBinding
|
||||
public void uploadImageSuccess(MineUserInfoBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
int versionCode = (int) AppInfoUtil.getAppVersionCode(mContext);
|
||||
if(bean == null){
|
||||
return;
|
||||
}
|
||||
if(!bean.isForceUpdate()){//不强制
|
||||
isForceUpdate = false;
|
||||
}else{
|
||||
isForceUpdate = true;
|
||||
}
|
||||
//前期强制更新
|
||||
// isForceUpdate = true;
|
||||
if(bean.getVersionCode() > versionCode){
|
||||
//App更新dialog
|
||||
mUpdateDialog = new DialogAppUpdate(mContext,R.layout.dialog_app_update_water,isForceUpdate,bean);
|
||||
mUpdateDialog.show();
|
||||
mUpdateDialog.setOnDialogListener(new DialogAppUpdate.DialogListener() {
|
||||
@Override
|
||||
public void callBackGetPermisson(String permission) {
|
||||
if (!hasRecordPermission(permission)) {
|
||||
if (Manifest.permission.POST_NOTIFICATIONS.equals(permission)) {
|
||||
getPermissionRequst(permission,"通知权限申请",
|
||||
"渥田氏需要通知权限来显示应用下载进度",POST_NOTIFICATIONS_PERMISSION_CODE);
|
||||
return;
|
||||
}
|
||||
// 没有权限,只在ACTION_DOWN时去申请
|
||||
getPermissionRequst(permission,"文件存储权限申请",
|
||||
"渥田氏需要您的授权,获取存储权限来更新您的应用",WRITE_FILE_PERMISSON_CPDE);
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downLoadFinish() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToastUtil.showShort(mContext,"下载完成,正在安装");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void activationVipSuccess(BaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getVersionCheck(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getYunshiDataSuccess(BaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull @NotNull String[] permissions, @NonNull @NotNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
|
||||
hidePermissionDialog();
|
||||
if(requestCode == WRITE_FILE_PERMISSON_CPDE){
|
||||
if(mUpdateDialog != null && grantResults.length > 0 && grantResults[0] == android.content.pm.PackageManager.PERMISSION_GRANTED){
|
||||
mUpdateDialog.startUpdateApp();
|
||||
}
|
||||
}else if(requestCode == POST_NOTIFICATIONS_PERMISSION_CODE){
|
||||
if(mUpdateDialog != null && grantResults.length > 0 && grantResults[0] == android.content.pm.PackageManager.PERMISSION_GRANTED){
|
||||
mUpdateDialog.startUpdateApp();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ import android.os.CountDownTimer;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.utils.manager.WaterUserInfoManager;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.ckkj.water.AppConfig;
|
||||
import com.ckkj.water.R;
|
||||
@@ -47,10 +49,10 @@ public class UserLogOffAccountActivity extends BaseActivity<UserLogOffActivityBi
|
||||
.init();
|
||||
viewBinding.includeTitle.tvTitle.setText("注销账号");
|
||||
if(AppConfig.USER_LOGIN){
|
||||
// String phoneNum = WaterUserInfoManager.getInstance().getUserInfo().getMobile();
|
||||
// if(!TextUtils.isEmpty(phoneNum)){
|
||||
// viewBinding.tvUserPhone.setText(PhoneNumberUtils.hidePhoneNumber(phoneNum));
|
||||
// }
|
||||
String phoneNum = WaterUserInfoManager.getInstance().getUserInfo().getUser().getPhonenumber();
|
||||
if(!TextUtils.isEmpty(phoneNum)){
|
||||
viewBinding.tvUserPhone.setText(phoneNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,4 +136,9 @@ public class UserLogOffAccountActivity extends BaseActivity<UserLogOffActivityBi
|
||||
public void uploadImageSuccess(MineUserInfoBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAppVersionSuccess(CheckVersionEntity bean) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ckkj.water.mine.mvp;
|
||||
|
||||
import com.ckkj.water.base.IView;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.network.BaseBean;
|
||||
|
||||
@@ -44,6 +45,7 @@ public class MineContract {
|
||||
void logOutSuccess(BaseBean bean);
|
||||
//上传图片成功
|
||||
void uploadImageSuccess(MineUserInfoBean bean);
|
||||
void getAppVersionSuccess(CheckVersionEntity bean);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,12 @@ package com.ckkj.water.mine.mvp;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.ckkj.water.BuildConfig;
|
||||
import com.ckkj.water.base.BasePresenter;
|
||||
import com.ckkj.water.main.MainContract;
|
||||
import com.ckkj.water.main.MainImpl;
|
||||
import com.ckkj.water.main.MainPresenter;
|
||||
import com.ckkj.water.main.entity.CheckVersionEntity;
|
||||
import com.ckkj.water.mine.entity.MineUserInfoBean;
|
||||
import com.ckkj.water.login.mvp.LoginContract;
|
||||
import com.ckkj.water.login.mvp.LoginImpl;
|
||||
@@ -168,4 +173,26 @@ public class MinePresenter extends BasePresenter<MineContract.MineView> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void checkNewVersion() {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("platform","android");
|
||||
map.put("currentVersion", BuildConfig.APP_VERSION_NAME);
|
||||
new MainImpl().checkAppVersionCode(map, new MainContract.CallBack<CheckVersionEntity>() {
|
||||
@Override
|
||||
public void success(CheckVersionEntity bean) {
|
||||
if( MinePresenter.this.getView() != null){
|
||||
MinePresenter.this.getView().getAppVersionSuccess(bean);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fail(String msg) {
|
||||
if( MinePresenter.this.getView() != null){
|
||||
MinePresenter.this.getView().showError(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,10 +147,10 @@ public interface Request {
|
||||
Observable<BaseBean<WaterStatisticsEntity>> getDataStatistics(@HeaderMap Map<String, String> headMap);
|
||||
|
||||
|
||||
|
||||
//版本检测更新
|
||||
@GET("app/v1/checkVersion")
|
||||
Observable<BaseBean<CheckVersionEntity>> checkVersionCode(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, String> map);
|
||||
//版本检测更新
|
||||
|
||||
@POST("mine/api/versionNum")
|
||||
Observable<BaseBean<CheckVersionEntity>> getVersionCheck(@HeaderMap Map<String, String> headMap, @QueryMap Map<String, Object> map);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
android:background="@color/white">
|
||||
<include
|
||||
android:id="@+id/include_title"
|
||||
layout="@layout/include_activity_back_layout"/>
|
||||
layout="@layout/include_activity_back_whitebg_layout"/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -2,66 +2,31 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/mainBackgroundColor">
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white">
|
||||
android:background="@color/mainBackgroundColor">
|
||||
<include
|
||||
android:id="@+id/include_title"
|
||||
layout="@layout/include_activity_back_layout"/>
|
||||
layout="@layout/include_activity_back_whitebg_layout"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_change_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:text="我的账号"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_user_phone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text=""
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_toLeftOf="@+id/img_point_right1"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_point_right1"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:src="@mipmap/img_point_right_gray"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_gray2"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_check_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="检查更新"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
@@ -71,7 +36,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_ff999999"
|
||||
android:text="version 1.2.3"
|
||||
android:text=""
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:layout_toLeftOf="@+id/img_point_right2"/>
|
||||
@@ -92,14 +57,14 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_set_cache"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="清除缓存"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
@@ -126,44 +91,18 @@
|
||||
android:background="@color/color_gray2"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_commit_service"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:text="问题反馈"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_point_right7"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:src="@mipmap/img_point_right_gray"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@color/color_gray2"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_user_agreement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="用户协议"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
@@ -184,14 +123,14 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_user_privacy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="隐私政策"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
@@ -212,14 +151,14 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_log_off"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_48"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="注销账号"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
@@ -245,7 +184,7 @@
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="如有问题,请联系我们: kunyanzhiyao@outlook.com"
|
||||
android:text="如有问题,请联系我们: sales@watex.com.cn"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
tools:listitem="@layout/scan_ble_device_item"
|
||||
app:spanCount="4"
|
||||
app:spanCount="2"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
android:visibility="gone"/>
|
||||
|
||||
|
||||
@@ -16,211 +16,222 @@
|
||||
android:id="@+id/included_title"
|
||||
layout="@layout/include_activity_back_whitebg_layout" />
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_device_status"
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="48sp"
|
||||
android:textStyle="bold"
|
||||
android:text="工作中"
|
||||
android:textColor="@color/color_zhu"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_device_update_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:text="更新时间:5-1 08:30"
|
||||
android:textColor="@color/color_666666"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_26">
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_bt"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_device_ctrl_green_cor12">
|
||||
<ImageView
|
||||
android:id="@+id/img_ble"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_ctrl_bt_white"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_wifi"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:layout_marginLeft="@dimen/dp_22"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_device_ctrl_green_cor12">
|
||||
<ImageView
|
||||
android:id="@+id/img_wifi_logo"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_ctrl_wifi_white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/linear_bat"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:layout_marginLeft="@dimen/dp_22"
|
||||
android:background="@drawable/shape_device_ctrl_white_cor12">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_center"
|
||||
android:layout_width="@dimen/dp_0_5"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_bat_status"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_ctrl_batt_red"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_15">
|
||||
<LinearLayout
|
||||
android:gravity="center_horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_device_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="48sp"
|
||||
android:textStyle="bold"
|
||||
android:text="工作中"
|
||||
android:textColor="@color/color_zhu"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_device_update_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
android:text="更新时间:5-1 08:30"
|
||||
android:textColor="@color/color_666666"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="@string/device_work_progress_title"
|
||||
android:layout_marginLeft="@dimen/dp_30"/>
|
||||
android:layout_marginTop="@dimen/dp_26">
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_bt"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_device_ctrl_green_cor12">
|
||||
<ImageView
|
||||
android:id="@+id/img_ble"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_ctrl_bt_white"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_wifi"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:layout_marginLeft="@dimen/dp_22"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_device_ctrl_green_cor12">
|
||||
<ImageView
|
||||
android:id="@+id/img_wifi_logo"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:src="@mipmap/icon_ctrl_wifi_white"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="@string/device_work_progress_tips"
|
||||
android:layout_marginLeft="@dimen/dp_5"/>
|
||||
<FrameLayout
|
||||
android:id="@+id/linear_bat"
|
||||
android:layout_width="@dimen/dp_67"
|
||||
android:layout_height="@dimen/dp_67"
|
||||
android:layout_marginLeft="@dimen/dp_22"
|
||||
android:background="@drawable/shape_device_ctrl_white_cor12">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_center"
|
||||
android:layout_width="@dimen/dp_0_5"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_bat_status"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/icon_ctrl_batt_red"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<!--自定义progress-->
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_work"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginHorizontal="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:max="100"
|
||||
android:progress="60"
|
||||
android:progressDrawable="@drawable/device_progress_bg"
|
||||
android:progressTint="@null"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_15">
|
||||
<RelativeLayout
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_30">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="@string/device_work_times_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="30min"
|
||||
android:layout_marginLeft="@dimen/dp_5"/>
|
||||
</RelativeLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_time_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
tools:listitem="@layout/device_work_time_item"
|
||||
app:spanCount="4"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:paddingVertical="@dimen/dp_6"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_f9f9f9_corner_5"
|
||||
android:layout_marginHorizontal="@dimen/dp_10">
|
||||
<TextView
|
||||
android:id="@+id/tv_work_duartion"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:layout_weight="3"
|
||||
android:background="@null"
|
||||
android:textSize="14sp"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/device_custom_work_time"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_15">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="@string/device_work_progress_title"
|
||||
android:layout_marginLeft="@dimen/dp_30"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="@string/device_work_progress_tips"
|
||||
android:layout_marginLeft="@dimen/dp_5"/>
|
||||
</LinearLayout>
|
||||
<!--自定义progress-->
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_work"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginHorizontal="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:max="100"
|
||||
android:progress="60"
|
||||
android:progressDrawable="@drawable/device_progress_bg"
|
||||
android:progressTint="@null"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="min"/>
|
||||
</LinearLayout>
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="@dimen/dp_15">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_30">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:text="@string/device_work_times_title"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="30min"
|
||||
android:layout_marginLeft="@dimen/dp_5"/>
|
||||
</RelativeLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_time_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingHorizontal="@dimen/dp_5"
|
||||
tools:listitem="@layout/device_work_time_item"
|
||||
app:spanCount="4"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:paddingVertical="@dimen/dp_6"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_f9f9f9_corner_5"
|
||||
android:layout_marginHorizontal="@dimen/dp_10">
|
||||
<TextView
|
||||
android:id="@+id/tv_work_duartion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:layout_weight="3"
|
||||
android:background="@null"
|
||||
android:textSize="14sp"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/device_custom_work_time"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/color_666666"
|
||||
android:text="min"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/device_control_start"
|
||||
android:background="@drawable/shape_green_button_bg"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"/>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/device_control_start"
|
||||
android:background="@drawable/shape_green_button_bg"
|
||||
android:paddingVertical="@dimen/dp_10"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:gravity="center"/>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -13,8 +13,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@mipmap/icon_launch_icon"
|
||||
android:layout_marginTop="80dp"/>
|
||||
android:src="@mipmap/img_login_app_logo"
|
||||
android:layout_marginTop="128dp"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -30,7 +30,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="151"
|
||||
android:visibility="visible"/>
|
||||
android:visibility="gone"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -167,7 +167,7 @@
|
||||
<EditText
|
||||
android:id="@+id/et_input_psd"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@null"
|
||||
@@ -180,7 +180,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_show"/>
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_login"
|
||||
|
||||
@@ -103,14 +103,22 @@
|
||||
android:src="@mipmap/icon_psd"/>
|
||||
<EditText
|
||||
android:id="@+id/et_input_psd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="textPassword"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_psd"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -129,14 +137,22 @@
|
||||
android:src="@mipmap/icon_psd"/>
|
||||
<EditText
|
||||
android:id="@+id/et_input_psd_agin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="9"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:inputType="textPassword"
|
||||
android:background="@null"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_psd_agin"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide_agin"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
android:gravity="center_horizontal">
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/img_device"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/app_logo"
|
||||
app:riv_corner_radius="@dimen/dp_10"/>
|
||||
android:layout_width="@dimen/dp_130"
|
||||
android:layout_height="@dimen/dp_97"
|
||||
android:src="@mipmap/icon_water_ble_device"
|
||||
app:riv_corner_radius="@dimen/dp_10"
|
||||
android:scaleType="fitXY"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_device_name"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
android:background="@color/white">
|
||||
<include
|
||||
android:id="@+id/include_title"
|
||||
layout="@layout/include_activity_back_layout"/>
|
||||
layout="@layout/include_activity_back_whitebg_layout"/>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
BIN
app/src/main/res/mipmap-xhdpi/icon_water_ble_device.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/icon_water_ble_device.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
BIN
app/src/main/res/mipmap-xhdpi/img_login_app_logo.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/img_login_app_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/icon_water_ble_device.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_water_ble_device.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/img_login_app_logo.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/img_login_app_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/img_login_app_logo.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/img_login_app_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
@@ -265,6 +265,8 @@
|
||||
<string name="confirm_delete_record">Delete Record</string>
|
||||
<string name="no_more_data">No more data</string>
|
||||
|
||||
<string name="user_agreement_mine">User Agreement</string>
|
||||
|
||||
<!-- End -->
|
||||
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@
|
||||
<string name="logout_dialog_tips">确定退出当前账号</string>
|
||||
<string name="edit_nickname">修改昵称</string>
|
||||
<string name="input_nickname">请输入昵称</string>
|
||||
<string name="user_agreement_mine">用户协议</string>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user