Compare commits
7 Commits
a31443fa4c
...
22f197a929
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22f197a929 | ||
|
|
b25e3540fb | ||
|
|
ec59249b3b | ||
|
|
192ca7d3a4 | ||
|
|
69830dfc69 | ||
|
|
a9ed6f9452 | ||
|
|
5dae94788c |
4
.idea/deploymentTargetSelector.xml
generated
4
.idea/deploymentTargetSelector.xml
generated
@@ -4,10 +4,10 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2026-07-10T01:12:18.170652300Z">
|
||||
<DropdownSelection timestamp="2026-07-14T09:31:19.203364400Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=D122222104A9" />
|
||||
<DeviceId pluginId="Default" identifier="serial=emulator-5554;connection=53435af5" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
|
||||
@@ -15,7 +15,7 @@ public class AppConfig {
|
||||
|
||||
|
||||
/**************************测试*******************************/
|
||||
// public static String BASE_URL = "http://47.106.83.229:8081/";//测试http://47.106.83.166:8001/
|
||||
// public static String BASE_URL = "http://47.106.83.229:8081/";//测试http://47.106.83.166:8001/ .
|
||||
// public static String BASE_URL_TWO = BASE_URL;//测试
|
||||
// public static String BASE_URL_THREE = BASE_URL;//测试
|
||||
// public static boolean IS_TEST_REQUEST = true;
|
||||
|
||||
@@ -156,11 +156,11 @@ public class MyApplication extends Application {
|
||||
public void onActivityDestroyed(Activity activity) {}
|
||||
});
|
||||
|
||||
AutoSizeConfig.getInstance()
|
||||
// 是否使用设备真实尺寸
|
||||
.setUseDeviceSize(true)
|
||||
// 是否支持 fragment
|
||||
.setCustomFragment(true);
|
||||
// AutoSizeConfig.getInstance()
|
||||
// // 是否使用设备真实尺寸
|
||||
// .setUseDeviceSize(true)
|
||||
// // 是否支持 fragment
|
||||
// .setCustomFragment(true);
|
||||
android.util.Log.e("TEST", "hello");
|
||||
}
|
||||
|
||||
|
||||
@@ -1202,6 +1202,7 @@ public abstract class BaseActivity<T extends ViewBinding, P extends IPresenter>
|
||||
editText.setInputType(
|
||||
InputType.TYPE_CLASS_NUMBER
|
||||
);
|
||||
editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(4)});
|
||||
break;
|
||||
|
||||
case INPUT_TYPE_LETTER:
|
||||
@@ -1252,6 +1253,10 @@ public abstract class BaseActivity<T extends ViewBinding, P extends IPresenter>
|
||||
});
|
||||
break;
|
||||
|
||||
case INPUT_TYPE_NORMAL:
|
||||
editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20)});
|
||||
break;
|
||||
|
||||
default:
|
||||
editText.setInputType(
|
||||
InputType.TYPE_CLASS_TEXT
|
||||
|
||||
@@ -46,6 +46,7 @@ import de.greenrobot.event.ThreadMode;
|
||||
public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBinding, DevicePresenter>
|
||||
implements DeviceContract.DeviceView {
|
||||
|
||||
private static final long DEVICE_DETAIL_POLL_INTERVAL_MS = 10_000L;
|
||||
private List<String> mTimeList = new ArrayList<>();
|
||||
private WaterDeviceEntity mDeviceEntity;
|
||||
private WaterDeviceEntity mRemoteDeviceEntity;
|
||||
@@ -53,6 +54,8 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
//用户自定义的浇水时长
|
||||
private int mCustomDuration = 0;
|
||||
private final Handler mProgressHandler = new Handler(Looper.getMainLooper());
|
||||
private final Handler mDeviceDetailPollHandler = new Handler(Looper.getMainLooper());
|
||||
private boolean mIsDeviceDetailPolling;
|
||||
private long mWorkStartTime = 0L;
|
||||
private long mWorkEndTime = 0L;
|
||||
private boolean mHasRefreshAfterWorkFinished = false;
|
||||
@@ -62,6 +65,18 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
updateWorkProgress();
|
||||
}
|
||||
};
|
||||
private final Runnable mDeviceDetailPollRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!mIsDeviceDetailPolling) {
|
||||
return;
|
||||
}
|
||||
if (mDeviceEntity != null && !TextUtils.isEmpty(mDeviceEntity.getDeviceNo())) {
|
||||
mPresenter.getDeviceDetailInfo(mDeviceEntity.getDeviceNo());
|
||||
}
|
||||
mDeviceDetailPollHandler.postDelayed(this, DEVICE_DETAIL_POLL_INTERVAL_MS);
|
||||
}
|
||||
};
|
||||
@Override
|
||||
public DevicePresenter createPresenter() {
|
||||
return new DevicePresenter(new DeviceImpl());
|
||||
@@ -513,9 +528,33 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
||||
mWorkEndTime = 0L;
|
||||
}
|
||||
|
||||
private void startDeviceDetailPolling() {
|
||||
mIsDeviceDetailPolling = true;
|
||||
mDeviceDetailPollHandler.removeCallbacks(mDeviceDetailPollRunnable);
|
||||
mDeviceDetailPollHandler.postDelayed(mDeviceDetailPollRunnable, DEVICE_DETAIL_POLL_INTERVAL_MS);
|
||||
}
|
||||
|
||||
private void stopDeviceDetailPolling() {
|
||||
mIsDeviceDetailPolling = false;
|
||||
mDeviceDetailPollHandler.removeCallbacks(mDeviceDetailPollRunnable);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
startDeviceDetailPolling();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
stopDeviceDetailPolling();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
stopWorkProgressUpdate();
|
||||
stopDeviceDetailPolling();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.view.View;
|
||||
import com.ckkj.water.ConstantUtil;
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
import com.ckkj.water.base.BaseFragment;
|
||||
import com.ckkj.water.databinding.SetDeviceNameLayoutBinding;
|
||||
import com.ckkj.water.device.mvp.DeviceContract;
|
||||
import com.ckkj.water.device.mvp.DeviceImpl;
|
||||
@@ -90,7 +91,7 @@ public class DeviceReNameActivity extends BaseActivity<SetDeviceNameLayoutBindin
|
||||
@Override
|
||||
public void addDeviceSuccess(WaterDeviceEntity bean) {
|
||||
hideDialogLoading();
|
||||
ToastUtil.showShort(mContext,"设备保存成功");
|
||||
ToastUtil.showShort(mContext,getString(R.string.device_save_success));
|
||||
ActivityManager.removeActivityByTag(ConstantUtil.ADD_DEVICE_FLAG);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
@@ -116,7 +117,22 @@ public class DeviceReNameActivity extends BaseActivity<SetDeviceNameLayoutBindin
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
hideDialogLoading();
|
||||
showDialogtext(null, false, false, false,
|
||||
getString(R.string.tip_text),
|
||||
message,
|
||||
null,
|
||||
getString(R.string.confirm_text),
|
||||
new BaseFragment.OnDialogClick() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,9 +9,13 @@ import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.ckkj.water.ConstantUtil;
|
||||
import com.ckkj.water.R;
|
||||
@@ -46,6 +50,8 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
||||
implements DeviceContract.DeviceView {
|
||||
|
||||
private static final long BLE_CONNECT_TIMEOUT = 40 * 1000L;
|
||||
//当前密码显示/隐藏
|
||||
private boolean isPasswordVisible = false;
|
||||
|
||||
private WifiListAdapter wifiListAdapter;
|
||||
//100 来自设备添加, 200 来自设备信息
|
||||
@@ -166,6 +172,7 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
||||
setClick(viewBinding.includedTitle.imgBack);
|
||||
setClick(viewBinding.tvSelectWifi);
|
||||
setClick(viewBinding.tvNext);
|
||||
setClick(viewBinding.imgPsdShowHide);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
@@ -210,9 +217,38 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide:
|
||||
togglePasswordVisibility();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private void goToDeviceConnect(String wifiPassword) {
|
||||
if (espProvisionManager == null) {
|
||||
initEspProvision();
|
||||
|
||||
@@ -1,396 +0,0 @@
|
||||
package com.ckkj.water.device;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.wifi.ScanResult;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.core.app.ActivityCompat;
|
||||
|
||||
import com.ckkj.water.ConstantUtil;
|
||||
import com.ckkj.water.R;
|
||||
import com.ckkj.water.base.BaseActivity;
|
||||
import com.ckkj.water.databinding.DeviceResetWifiBinding;
|
||||
import com.ckkj.water.device.adapter.WifiListAdapter;
|
||||
import com.ckkj.water.device.mvp.DeviceContract;
|
||||
import com.ckkj.water.device.mvp.DeviceImpl;
|
||||
import com.ckkj.water.device.mvp.DevicePresenter;
|
||||
import com.ckkj.water.espBle.EspProvisionManager;
|
||||
import com.ckkj.water.espBle.ProvisionCallback;
|
||||
import com.ckkj.water.index.entity.WaterDeviceEntity;
|
||||
import com.ckkj.water.network.BaseBean;
|
||||
import com.ckkj.water.permission.PermissionActivity;
|
||||
import com.ckkj.water.utils.manager.ActivityManager;
|
||||
import com.ckkj.water.utils.manager.ThemeManager;
|
||||
import com.ckkj.water.utils.show.ToastUtil;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 配置wifi
|
||||
*/
|
||||
public class SelectWifiActivity_copy extends BaseActivity<DeviceResetWifiBinding, DevicePresenter>
|
||||
implements DeviceContract.DeviceView {
|
||||
|
||||
private WifiManager wifiManager;
|
||||
private WifiListAdapter wifiListAdapter;
|
||||
private WifiScanReceiver wifiScanReceiver;
|
||||
//100 来自设备添加, 200 来自设备信息
|
||||
private int WITCH_FROM_CODE = 100;
|
||||
|
||||
private String mWifiName = "";
|
||||
|
||||
private WaterDeviceEntity mBleDeviceEntity;
|
||||
private EspProvisionManager espProvisionManager;
|
||||
private boolean isBleConnecting = false;
|
||||
private boolean isBleConnected = false;
|
||||
|
||||
@Override
|
||||
public DevicePresenter createPresenter() {
|
||||
return new DevicePresenter(new DeviceImpl());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||
wifiScanReceiver = new WifiScanReceiver();
|
||||
ActivityManager.addActivity(this,getClass().getSimpleName() + "_" + ConstantUtil.ADD_DEVICE_FLAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
registerReceiver(wifiScanReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
unregisterReceiver(wifiScanReceiver);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (WITCH_FROM_CODE == 100 && espProvisionManager != null) {
|
||||
espProvisionManager.disconnect();
|
||||
espProvisionManager.setCallback(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
if(bundle != null){
|
||||
WITCH_FROM_CODE = bundle.getInt(ConstantUtil.ACTIVITY_NAVIGATE_FLAG);
|
||||
mBleDeviceEntity = (WaterDeviceEntity) bundle.getSerializable("ble_device_entity");
|
||||
}
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.color_gray_theme)
|
||||
.statusBarDarkFont(ThemeManager.isAppThemeLight(mContext))
|
||||
.titleBar(viewBinding.rlTitle)
|
||||
.init();
|
||||
if(WITCH_FROM_CODE == 200){
|
||||
viewBinding.tvNext.setText(getString(R.string.confirm_text));
|
||||
}
|
||||
viewBinding.includedTitle.tvTitle.setText(R.string.select_wifi_tip);
|
||||
|
||||
initListener();
|
||||
initWifiList();
|
||||
if (WITCH_FROM_CODE == 100) {
|
||||
initEspProvision();
|
||||
connectBleDevice();
|
||||
}
|
||||
}
|
||||
|
||||
private void initWifiList() {
|
||||
wifiListAdapter = new WifiListAdapter(mContext);
|
||||
viewBinding.rvWifiList.setAdapter(wifiListAdapter);
|
||||
wifiListAdapter.setOnWifiItemClickListener(wifiName -> {
|
||||
mWifiName = wifiName;
|
||||
viewBinding.etWifiName.setText(wifiName);
|
||||
viewBinding.rvWifiList.setVisibility(View.GONE);
|
||||
viewBinding.linearWifiInfo.setVisibility(View.VISIBLE);
|
||||
viewBinding.tvNext.setVisibility(View.VISIBLE);
|
||||
});
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
setClick(viewBinding.includedTitle.imgBack);
|
||||
setClick(viewBinding.tvSelectWifi);
|
||||
setClick(viewBinding.tvNext);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
view.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
public void onClick(View view){
|
||||
switch (view.getId()){
|
||||
case R.id.img_back:
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.tv_select_wifi:
|
||||
String[] permission = {
|
||||
Manifest.permission.ACCESS_FINE_LOCATION
|
||||
};
|
||||
boolean hasPermission = hasRecordPermission(permission);
|
||||
if(!hasPermission){
|
||||
goTo(mContext, PermissionActivity.class,null);
|
||||
}else{
|
||||
}
|
||||
scanWifi();
|
||||
break;
|
||||
|
||||
case R.id.tv_next:
|
||||
if(TextUtils.isEmpty(mWifiName)){
|
||||
ToastUtil.showShort(mContext,getString(R.string.toast_select_wifi_tip));
|
||||
return;
|
||||
}
|
||||
if(TextUtils.isEmpty(viewBinding.etInputPsd.getText().toString())){
|
||||
ToastUtil.showShort(mContext,getString(R.string.toast_select_wifi_psd_tip));
|
||||
return;
|
||||
}
|
||||
if(WITCH_FROM_CODE == 100){
|
||||
provisionWifi();
|
||||
}else{
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("wifi_name",mWifiName);
|
||||
intent.putExtra("wifi_psd",viewBinding.etInputPsd.getText().toString());
|
||||
setResult(RESULT_OK,intent);
|
||||
finish();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置网络
|
||||
*/
|
||||
private void provisionWifi() {
|
||||
if (espProvisionManager == null) {
|
||||
ToastUtil.showShort(mContext, "设备连接未初始化");
|
||||
return;
|
||||
}
|
||||
if (!isBleConnected) {
|
||||
if (!isBleConnecting) {
|
||||
connectBleDevice();
|
||||
}
|
||||
ToastUtil.showShort(mContext, "设备连接中,请稍后再试");
|
||||
return;
|
||||
}
|
||||
showProgressLoadingDialog(0);
|
||||
espProvisionManager.provisionWifi(mWifiName, viewBinding.etInputPsd.getText().toString());
|
||||
// goTo(mContext,DeviceConnectActivity.class,null);
|
||||
}
|
||||
|
||||
private void initEspProvision() {
|
||||
espProvisionManager = EspProvisionManager.init(mContext).setCallback(new ProvisionCallback() {
|
||||
@Override
|
||||
public void onConnecting() {
|
||||
isBleConnecting = true;
|
||||
isBleConnected = false;
|
||||
Log.i("TEST","onConnecting");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConnected() {
|
||||
isBleConnecting = false;
|
||||
isBleConnected = true;
|
||||
Log.i("TEST","onConnected设备连接成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProvisioning(int progress) {
|
||||
Log.i("TEST","WIFI连接进度 == " + progress);
|
||||
mProgressLoadingDialog.setProgress(progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String deviceName, String deviceType) {
|
||||
Log.i("TEST","deviceName:" + deviceName + "连接成功");
|
||||
ToastUtil.showShort(mContext, deviceName + "连接成功");
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
hideDialogLoading();
|
||||
}
|
||||
}, 800);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(int errorCode, String message) {
|
||||
isBleConnecting = false;
|
||||
if (errorCode != 0) {
|
||||
isBleConnected = espProvisionManager != null && espProvisionManager .isConnected();
|
||||
}
|
||||
Log.i("TEST","errorCode == " + errorCode + " message == " + message);
|
||||
ToastUtil.showShort(mContext, message);
|
||||
hideDialogLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnected() {
|
||||
isBleConnecting = false;
|
||||
isBleConnected = false;
|
||||
hideDialogLoading();
|
||||
Log.i("TEST","onDisconnected");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWifiListReceived(String[] wifiList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWifiListFailed(String message) {
|
||||
Log.i("TEST","onWifiListFailed-Msg==" + message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProvisioningRejected() {
|
||||
Log.i("TEST","onProvisioningRejected");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接设备
|
||||
*/
|
||||
private void connectBleDevice() {
|
||||
if (WITCH_FROM_CODE != 100 || mBleDeviceEntity == null || espProvisionManager == null) {
|
||||
return;
|
||||
}
|
||||
if (isBleConnected || isBleConnecting) {
|
||||
return;
|
||||
}
|
||||
espProvisionManager.connect(mBleDeviceEntity.getMacAddress(), mBleDeviceEntity.getDeviceName());
|
||||
}
|
||||
|
||||
private void scanWifi() {
|
||||
showLoadingDialog();
|
||||
viewBinding.tvNext.setVisibility(View.GONE);
|
||||
if (wifiManager != null && wifiManager.isWifiEnabled()) {
|
||||
wifiManager.startScan();
|
||||
} else {
|
||||
ToastUtil.showShort(mContext, getString(R.string.wifi_not_enabled));
|
||||
hideDialogLoading();
|
||||
}
|
||||
}
|
||||
|
||||
private void displayWifiList(List<ScanResult> scanResults) {
|
||||
Set<String> wifiSet = new HashSet<>();
|
||||
List<String> wifiNameList = new ArrayList<>();
|
||||
|
||||
for (ScanResult result : scanResults) {
|
||||
String wifiName = result.SSID;
|
||||
if (wifiName != null && !wifiName.isEmpty() && !wifiSet.contains(wifiName)) {
|
||||
wifiSet.add(wifiName);
|
||||
wifiNameList.add(wifiName);
|
||||
}
|
||||
}
|
||||
hideDialogLoading();
|
||||
|
||||
if (wifiNameList.isEmpty()) {
|
||||
ToastUtil.showShort(mContext, getString(R.string.no_wifi_found));
|
||||
viewBinding.linearWifiInfo.setVisibility(View.VISIBLE);
|
||||
viewBinding.rvWifiList.setVisibility(View.GONE);
|
||||
} else {
|
||||
wifiListAdapter.setData(wifiNameList);
|
||||
viewBinding.linearWifiInfo.setVisibility(View.GONE);
|
||||
viewBinding.rvWifiList.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDeviceSuccess(WaterDeviceEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDeviceDetailInfo(WaterDeviceEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editDeviceInfoSuccess(BaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDeviceSuccess(BaseBean bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void turnOnOffDeviceSuccess(BaseBean bean, String status) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void queryDeviceWorkTimeSuccess(WaterDeviceEntity bean) {
|
||||
|
||||
}
|
||||
|
||||
private class WifiScanReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (WifiManager.SCAN_RESULTS_AVAILABLE_ACTION.equals(intent.getAction())) {
|
||||
boolean success = intent.getBooleanExtra(WifiManager.EXTRA_RESULTS_UPDATED, false);
|
||||
if (success) {
|
||||
if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
// TODO: Consider calling
|
||||
// ActivityCompat#requestPermissions
|
||||
// here to request the missing permissions, and then overriding
|
||||
// public void onRequestPermissionsResult(int requestCode, String[] permissions,
|
||||
// int[] grantResults)
|
||||
// to handle the case where the user grants the permission. See the documentation
|
||||
// for ActivityCompat#requestPermissions for more details.
|
||||
return;
|
||||
}
|
||||
List<ScanResult> results = wifiManager.getScanResults();
|
||||
displayWifiList(results);
|
||||
} else {
|
||||
ToastUtil.showShort(mContext, getString(R.string.wifi_scan_failed));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutResId(Bundle savedInstanceState) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showError(String message) {
|
||||
ToastUtil.showShort(mContext,message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logOut(BaseBean bean) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class LoginActivity extends BaseActivity<LoginLayoutBinding, LoginPresent
|
||||
|
||||
private boolean mYinsiConfirm = false;
|
||||
private boolean isPasswordVisible = false;
|
||||
//当前登录方式 验证码100 密码 200
|
||||
//当前登录方式 验证码100 密码 200..
|
||||
private static int LOGIN_TYPE_STATUS_CODE = 100;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.ckkj.water.mine;
|
||||
|
||||
import android.os.Bundle;
|
||||
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;
|
||||
@@ -25,6 +29,10 @@ import com.gyf.immersionbar.ImmersionBar;
|
||||
public class ResetPsdActivity extends BaseActivity<ResetPsdLayoutBinding, MinePresenter>
|
||||
implements MineContract.MineView {
|
||||
|
||||
private boolean isOldPasswordVisible = false;
|
||||
private boolean isNewPasswordVisible = false;
|
||||
private boolean isConfirmPasswordVisible = false;
|
||||
|
||||
@Override
|
||||
public void initData(Bundle savedInstanceState) {
|
||||
super.initData(savedInstanceState);
|
||||
@@ -41,6 +49,9 @@ public class ResetPsdActivity extends BaseActivity<ResetPsdLayoutBinding, MinePr
|
||||
private void initListener() {
|
||||
setClick(viewBinding.includedTitle.imgBack);
|
||||
setClick(viewBinding.tvCommit);
|
||||
setClick(viewBinding.imgPsdShowHideOld);
|
||||
setClick(viewBinding.imgPsdShowHideNew1);
|
||||
setClick(viewBinding.imgPsdShowHideNew2);
|
||||
}
|
||||
|
||||
private void setClick(View view) {
|
||||
@@ -78,9 +89,45 @@ public class ResetPsdActivity extends BaseActivity<ResetPsdLayoutBinding, MinePr
|
||||
mPresenter.updateUserPsdByOld(viewBinding.etCurrentPsd.getText().toString(),
|
||||
viewBinding.etInputConfirmPsd.getText().toString());
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide_old:
|
||||
togglePasswordVisibility(viewBinding.etCurrentPsd, viewBinding.imgPsdShowHideOld,
|
||||
isOldPasswordVisible);
|
||||
isOldPasswordVisible = !isOldPasswordVisible;
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide_new1:
|
||||
togglePasswordVisibility(viewBinding.etNewPsd, viewBinding.imgPsdShowHideNew1,
|
||||
isNewPasswordVisible);
|
||||
isNewPasswordVisible = !isNewPasswordVisible;
|
||||
break;
|
||||
|
||||
case R.id.img_psd_show_hide_new2:
|
||||
togglePasswordVisibility(viewBinding.etInputConfirmPsd, viewBinding.imgPsdShowHideNew2,
|
||||
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());
|
||||
}
|
||||
|
||||
/**
|
||||
* 密码重置成功
|
||||
* @param bean
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.ckkj.water.network;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -388,7 +389,9 @@ public class NetWorkManager {
|
||||
public static Map<String, String> getToken() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
try {
|
||||
map.put("Authorization", "Bearer " + AppConfig.USER_TOKEN);
|
||||
if(!TextUtils.isEmpty(AppConfig.USER_TOKEN)){
|
||||
map.put("Authorization", "Bearer " + AppConfig.USER_TOKEN);
|
||||
}
|
||||
map.put("clientId", AppConfig.APP_CLIENT_ID);
|
||||
map.put("content-language", LanguageManager.getCurrentRequestLanguage());
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.yanzhenjie.recyclerview.widget.DefaultItemDecoration;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -524,6 +525,18 @@ public class WaterConfigFragment extends BaseFragment<WaterConfigFragmentLayoutC
|
||||
*/
|
||||
private void selectStartTime(int position) {
|
||||
boolean times[] = {false, false, false, true, true, false};
|
||||
Calendar selectedTime = Calendar.getInstance();
|
||||
String startTime = weekList.get(mWeekAdapter.getmPos()).getTimeData().get(position).getStartTime();
|
||||
if (!TextUtils.isEmpty(startTime)) {
|
||||
try {
|
||||
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm", Locale.getDefault());
|
||||
timeFormat.setLenient(false);
|
||||
Date date = timeFormat.parse(startTime);
|
||||
selectedTime.set(Calendar.HOUR_OF_DAY, date.getHours());
|
||||
selectedTime.set(Calendar.MINUTE, date.getMinutes());
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
//时间选择器
|
||||
TimePickerView pvTime = new TimePickerBuilder(mContext, new OnTimeSelectListener() {
|
||||
@Override
|
||||
@@ -537,6 +550,7 @@ public class WaterConfigFragment extends BaseFragment<WaterConfigFragmentLayoutC
|
||||
.setCancelColor(mContext.getColor(R.color.color_999999))
|
||||
.setSubmitColor(mContext.getColor(R.color.color_zhu))
|
||||
.setTextColorCenter(mContext.getColor(R.color.color_zhu))
|
||||
.setDate(selectedTime)
|
||||
.build();
|
||||
pvTime.show();
|
||||
}
|
||||
@@ -564,6 +578,10 @@ public class WaterConfigFragment extends BaseFragment<WaterConfigFragmentLayoutC
|
||||
|
||||
@Override
|
||||
public void onConfirmClisk(String content) {
|
||||
if(TextUtils.isEmpty(content)){
|
||||
ToastUtil.showShort(mContext, getString(R.string.input_water_plan_time_error));
|
||||
return;
|
||||
}
|
||||
if (Integer.parseInt(content) <= 0) {
|
||||
ToastUtil.showShort(mContext, getString(R.string.input_water_plan_time_error));
|
||||
return;
|
||||
|
||||
@@ -91,14 +91,22 @@
|
||||
android:src="@mipmap/icon_phone_code"/>
|
||||
<EditText
|
||||
android:id="@+id/et_input_psd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="textPassword"
|
||||
android:textSize="14sp"
|
||||
android:textColorHint="@color/textPrimaryColor"
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:hint="@string/input_wifi_psd_tip"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
android:id="@+id/tv_device_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="智能浇水设备A1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
android:background="@null"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_222222"
|
||||
@@ -133,6 +134,8 @@
|
||||
android:layout_weight="2"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@null"
|
||||
android:inputType="number"
|
||||
android:maxLength="6"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_222222"
|
||||
android:hint="@string/hint_input_verifi"/>
|
||||
@@ -172,16 +175,49 @@
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@null"
|
||||
android:textSize="14sp"
|
||||
android:maxLength="16"
|
||||
android:textColor="@color/color_222222"
|
||||
android:hint="@string/hint_input_psd"
|
||||
android:inputType="textPassword"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginLeft="@dimen/dp_20">
|
||||
<RelativeLayout
|
||||
android:id="@+id/realtive_read_finish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<RadioButton
|
||||
android:id="@+id/checkbox_read"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:background="@drawable/select_radio"
|
||||
android:layout_centerVertical="true"
|
||||
android:button="@null"
|
||||
android:clickable="false"
|
||||
android:visibility="visible" />
|
||||
<TextView
|
||||
android:id="@+id/tv_agreement_full"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:layout_toRightOf="@+id/checkbox_read"
|
||||
android:autoLink="none"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/color_gray_tab"
|
||||
android:textSize="11sp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:id="@+id/tv_login"
|
||||
android:layout_width="match_parent"
|
||||
@@ -192,7 +228,7 @@
|
||||
android:background="@drawable/shape_green_button_bg"
|
||||
android:paddingVertical="10dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -232,37 +268,5 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_alignParentBottom="true">
|
||||
<RelativeLayout
|
||||
android:id="@+id/realtive_read_finish"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginHorizontal="@dimen/dp_15"
|
||||
android:layout_marginBottom="@dimen/dp_30">
|
||||
<RadioButton
|
||||
android:id="@+id/checkbox_read"
|
||||
android:layout_width="@dimen/dp_14"
|
||||
android:layout_height="@dimen/dp_14"
|
||||
android:background="@drawable/select_radio"
|
||||
android:layout_centerVertical="true"
|
||||
android:button="@null"
|
||||
android:clickable="false"
|
||||
android:visibility="visible" />
|
||||
<TextView
|
||||
android:id="@+id/tv_agreement_full"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:layout_toRightOf="@+id/checkbox_read"
|
||||
android:autoLink="none"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:textColor="@color/color_gray_tab"
|
||||
android:textSize="11sp" />
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_marginTop="@dimen/dp_20">
|
||||
<TextView
|
||||
android:id="@+id/tv_name_key"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
@@ -76,14 +77,18 @@
|
||||
android:layout_alignParentRight="true"/>
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@+id/img_point1"
|
||||
android:layout_toRightOf="@+id/tv_name_key"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_999999"
|
||||
android:text="这里是昵称"/>
|
||||
android:text=""/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
@@ -70,6 +71,8 @@
|
||||
android:layout_weight="2"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="number"
|
||||
android:maxLength="6"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
@@ -109,14 +112,15 @@
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="16"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_psd"/>
|
||||
android:hint="@string/hint_input_new_psd"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
@@ -143,14 +147,15 @@
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:inputType="textPassword"
|
||||
android:background="@null"
|
||||
android:maxLength="16"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_psd_agin"/>
|
||||
android:hint="@string/hint_input_new_psd_agin"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide_agin"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -29,14 +29,23 @@
|
||||
android:src="@mipmap/icon_psd"/>
|
||||
<EditText
|
||||
android:id="@+id/et_current_psd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="16"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_old_psd"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide_old"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -54,14 +63,23 @@
|
||||
android:src="@mipmap/icon_psd"/>
|
||||
<EditText
|
||||
android:id="@+id/et_new_psd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="16"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_new_psd"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide_new1"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -80,14 +98,23 @@
|
||||
android:src="@mipmap/icon_psd"/>
|
||||
<EditText
|
||||
android:id="@+id/et_input_confirm_psd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="16"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_hint_theme_color"
|
||||
android:textColorHint="@color/text_hint_theme_color"
|
||||
android:hint="@string/hint_input_new_psd_agin"/>
|
||||
<ImageView
|
||||
android:id="@+id/img_psd_show_hide_new2"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_weight="0.5"
|
||||
android:src="@mipmap/icon_psd_hide"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:background="@null"
|
||||
android:maxLength="20"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_222222"
|
||||
android:hint="@string/input_device_name_hint"/>
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
android:id="@+id/ivRefresh"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/icon_water_loading" />
|
||||
android:src="@mipmap/icon_water_head_refresh" />
|
||||
</RelativeLayout>
|
||||
@@ -41,7 +41,8 @@
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:background="@null"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:hint="@string/input_plan_name"/>
|
||||
android:hint="@string/input_plan_name"
|
||||
android:maxLength="20"/>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
android:id="@+id/tv_device_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="智能浇水设备A1"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textColor="@color/textPrimaryColor"
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
BIN
app/src/main/res/mipmap-xxhdpi/icon_water_head_refresh.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_water_head_refresh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_water_head_refresh.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/icon_water_head_refresh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
@@ -312,6 +312,7 @@
|
||||
<string name="device_battery">Battery:</string>
|
||||
|
||||
<string name="update_time">Last Updated:</string>
|
||||
<string name="device_save_success">Device saved successfully</string>
|
||||
<!-- End -->
|
||||
|
||||
|
||||
|
||||
@@ -305,6 +305,8 @@
|
||||
|
||||
<string name="update_time">更新时间:</string>
|
||||
|
||||
<string name="device_save_success">设备保存成功</string>
|
||||
|
||||
<!--结束-->
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user