修改蓝牙连接、配网时动画设置。
This commit is contained in:
@@ -210,4 +210,9 @@ public class AddDeviceActivity extends BaseActivity<AddDeviceLayoutBinding, Devi
|
|||||||
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -448,6 +448,11 @@ public class AddDeviceActivity_copy extends BaseActivity<AddDeviceLayoutBinding,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|||||||
@@ -276,4 +276,9 @@ public class DeviceConnectActivity extends BaseActivity<DeviceConnectLayoutBindi
|
|||||||
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -353,4 +353,9 @@ public class DeviceControlActivity extends BaseActivity<DeviceControlLayoutBindi
|
|||||||
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,4 +102,9 @@ public class DeviceInfoActivity extends BaseActivity<DeviceInfoLayoutBinding, De
|
|||||||
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,4 +139,9 @@ public class DeviceReNameActivity extends BaseActivity<SetDeviceNameLayoutBindin
|
|||||||
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -224,4 +224,9 @@ public class DeviceSettingsActivity extends BaseActivity<DeviceSettingsLayoutBin
|
|||||||
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
public void turnOnOffDeviceSuccess(BaseBean bean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
package com.ckkj.water.device;
|
package com.ckkj.water.device;
|
||||||
|
|
||||||
|
import static android.view.View.GONE;
|
||||||
|
import static android.view.View.VISIBLE;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.drawable.AnimationDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -50,11 +55,14 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
private String mWifiName = "";
|
private String mWifiName = "";
|
||||||
|
|
||||||
private WaterDeviceEntity mBleDeviceEntity;
|
private WaterDeviceEntity mBleDeviceEntity;
|
||||||
|
private WaterDeviceEntity mRemoteDeviceEntity;
|
||||||
private EspProvisionManager espProvisionManager;
|
private EspProvisionManager espProvisionManager;
|
||||||
private boolean isBleConnecting = false;
|
private boolean isBleConnecting = false;
|
||||||
private boolean isBleConnected = false;
|
private boolean isBleConnected = false;
|
||||||
private boolean keepBleConnectionForProvision = false;
|
private boolean keepBleConnectionForProvision = false;
|
||||||
private Handler bleConnectHandler = new Handler();
|
private Handler bleConnectHandler = new Handler();
|
||||||
|
private AnimationDrawable animationDrawable;
|
||||||
|
private Handler handler = new Handler(Looper.getMainLooper());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DevicePresenter createPresenter() {
|
public DevicePresenter createPresenter() {
|
||||||
@@ -104,6 +112,31 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void startConnectAnimation() {
|
||||||
|
if (animationDrawable != null && animationDrawable.isRunning()) {
|
||||||
|
animationDrawable.stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
viewBinding.ivConnectAnimation.setImageResource(R.drawable.anim_connect_ble_device);
|
||||||
|
animationDrawable = (AnimationDrawable) viewBinding.ivConnectAnimation.getDrawable();
|
||||||
|
|
||||||
|
if (animationDrawable != null) {
|
||||||
|
animationDrawable.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopConnectAnimation() {
|
||||||
|
handler.removeCallbacksAndMessages(null);
|
||||||
|
if (animationDrawable != null) {
|
||||||
|
animationDrawable.stop();
|
||||||
|
animationDrawable = null;
|
||||||
|
}
|
||||||
|
viewBinding.linearConnectBle.setVisibility(GONE);
|
||||||
|
viewBinding.linearWifiContent.setVisibility(VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void initWifiList() {
|
private void initWifiList() {
|
||||||
wifiListAdapter = new WifiListAdapter(mContext);
|
wifiListAdapter = new WifiListAdapter(mContext);
|
||||||
viewBinding.rvWifiList.setAdapter(wifiListAdapter);
|
viewBinding.rvWifiList.setAdapter(wifiListAdapter);
|
||||||
@@ -193,25 +226,7 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 配置网络
|
|
||||||
*/
|
|
||||||
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() {
|
private void initEspProvision() {
|
||||||
espProvisionManager = EspProvisionManager.init(mContext).setCallback(new ProvisionCallback() {
|
espProvisionManager = EspProvisionManager.init(mContext).setCallback(new ProvisionCallback() {
|
||||||
@@ -227,8 +242,10 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
isBleConnecting = false;
|
isBleConnecting = false;
|
||||||
isBleConnected = true;
|
isBleConnected = true;
|
||||||
Log.i("TEST","onConnected设备连接成功");
|
Log.i("TEST","onConnected设备连接成功");
|
||||||
hideDialogLoading();
|
stopConnectAnimation();
|
||||||
ToastUtil.showShort(mContext, "设备连接成功");
|
ToastUtil.showShort(mContext, "设备连接成功");
|
||||||
|
//Tips 蓝牙扫描添加的设备不同于二维码扫描连接的设备,由于无法拿到deviceNo,所以需要请求接口获取
|
||||||
|
mPresenter.bindDeviceStatus(mBleDeviceEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -257,7 +274,7 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
}
|
}
|
||||||
Log.i("TEST","errorCode == " + errorCode + " message == " + message);
|
Log.i("TEST","errorCode == " + errorCode + " message == " + message);
|
||||||
ToastUtil.showShort(mContext, message);
|
ToastUtil.showShort(mContext, message);
|
||||||
hideDialogLoading();
|
stopConnectAnimation();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,9 +282,8 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
public void onDisconnected() {
|
public void onDisconnected() {
|
||||||
isBleConnecting = false;
|
isBleConnecting = false;
|
||||||
isBleConnected = false;
|
isBleConnected = false;
|
||||||
hideDialogLoading();
|
stopConnectAnimation();
|
||||||
Log.i("TEST","onDisconnected");
|
Log.i("TEST","onDisconnected");
|
||||||
hideDialogLoading();
|
|
||||||
ToastUtil.showShort(mContext, "设备已断开");
|
ToastUtil.showShort(mContext, "设备已断开");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +308,7 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
* 连接设备
|
* 连接设备
|
||||||
*/
|
*/
|
||||||
private void scheduleBleConnect() {
|
private void scheduleBleConnect() {
|
||||||
showLoadingDialog();
|
startConnectAnimation();
|
||||||
bleConnectHandler.removeCallbacksAndMessages(null);
|
bleConnectHandler.removeCallbacksAndMessages(null);
|
||||||
bleConnectHandler.postDelayed(new Runnable() {
|
bleConnectHandler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -364,6 +380,12 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
mBleDeviceEntity = bean.getBindDevice();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addDeviceSuccess(WaterDeviceEntity bean) {
|
public void addDeviceSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
@@ -389,6 +411,7 @@ public class SelectWifiActivity extends BaseActivity<DeviceResetWifiBinding, Dev
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLayoutResId(Bundle savedInstanceState) {
|
public int getLayoutResId(Bundle savedInstanceState) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -344,6 +344,11 @@ public class SelectWifiActivity_copy extends BaseActivity<DeviceResetWifiBinding
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void queryDeviceBindStatusSuccess(WaterDeviceEntity bean) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private class WifiScanReceiver extends BroadcastReceiver {
|
private class WifiScanReceiver extends BroadcastReceiver {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
|||||||
@@ -38,5 +38,7 @@ public class DeviceContract {
|
|||||||
void editDeviceInfoSuccess(BaseBean bean);
|
void editDeviceInfoSuccess(BaseBean bean);
|
||||||
void deleteDeviceSuccess(BaseBean bean);
|
void deleteDeviceSuccess(BaseBean bean);
|
||||||
void turnOnOffDeviceSuccess(BaseBean bean);
|
void turnOnOffDeviceSuccess(BaseBean bean);
|
||||||
|
|
||||||
|
void queryDeviceBindStatusSuccess(WaterDeviceEntity bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.ckkj.water.device.mvp;
|
|||||||
import com.ckkj.water.base.BasePresenter;
|
import com.ckkj.water.base.BasePresenter;
|
||||||
import com.ckkj.water.index.entity.WaterDeviceEntity;
|
import com.ckkj.water.index.entity.WaterDeviceEntity;
|
||||||
import com.ckkj.water.index.mvp.IndexContract;
|
import com.ckkj.water.index.mvp.IndexContract;
|
||||||
|
import com.ckkj.water.index.mvp.IndexImpl;
|
||||||
|
import com.ckkj.water.index.mvp.IndexPresenter;
|
||||||
import com.ckkj.water.network.BaseBean;
|
import com.ckkj.water.network.BaseBean;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
@@ -32,7 +34,7 @@ public class DevicePresenter extends BasePresenter<DeviceContract.DeviceView> {
|
|||||||
json.put("wifiName",mWifiName);
|
json.put("wifiName",mWifiName);
|
||||||
json.put("wifiPassword",mWifiPassword);
|
json.put("wifiPassword",mWifiPassword);
|
||||||
json.put("macAddress",mBleDeviceEntity.getMacAddress());
|
json.put("macAddress",mBleDeviceEntity.getMacAddress());
|
||||||
json.put("deviceNo", "01");
|
json.put("deviceNo", mBleDeviceEntity.getDeviceNo());
|
||||||
// json.put("deviceEm","213123123123");
|
// json.put("deviceEm","213123123123");
|
||||||
// json.put("deviceSn","sdfsd32423gdfgdf3");
|
// json.put("deviceSn","sdfsd32423gdfgdf3");
|
||||||
// json.put("fwVer","fwVer-56565644");
|
// json.put("fwVer","fwVer-56565644");
|
||||||
@@ -165,4 +167,35 @@ public class DevicePresenter extends BasePresenter<DeviceContract.DeviceView> {
|
|||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定设备状态
|
||||||
|
* @param entity
|
||||||
|
*/
|
||||||
|
public void bindDeviceStatus(WaterDeviceEntity entity) {
|
||||||
|
try {
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("macAddress",entity.getMacAddress());
|
||||||
|
new IndexImpl().queryDeviceBindStatus(json, new IndexContract.CallBack<WaterDeviceEntity>() {
|
||||||
|
@Override
|
||||||
|
public void success(WaterDeviceEntity bean, int total) {
|
||||||
|
bean.setMacAddress(entity.getMacAddress());
|
||||||
|
bean.setDeviceName(entity.getDeviceName());
|
||||||
|
if(DevicePresenter.this.getView() != null){
|
||||||
|
DevicePresenter.this.getView().queryDeviceBindStatusSuccess(bean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fail(String msg) {
|
||||||
|
if(DevicePresenter.this.getView() != null){
|
||||||
|
DevicePresenter.this.getView().showError(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (JSONException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import lombok.NoArgsConstructor;
|
|||||||
* @date 2026/5/15
|
* @date 2026/5/15
|
||||||
* @description 浇水历史记录
|
* @description 浇水历史记录
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
public class WateringRecord implements Serializable {
|
public class WateringRecord implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,9 +45,21 @@ public class WateringRecord implements Serializable {
|
|||||||
private String userId;
|
private String userId;
|
||||||
private String deviceNo;
|
private String deviceNo;
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
private int scheduleId;
|
private String scheduleId;
|
||||||
private String durationMin;
|
private String durationMin;
|
||||||
private Object zones;
|
private String zones;
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* commandId : null
|
||||||
|
* scheduleId : 2062827585485807618
|
||||||
|
* zones : null
|
||||||
|
* remark : 设备离线,按排程自动补记
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String commandId;
|
||||||
|
private String scheduleIdX;
|
||||||
|
private String zonesX;
|
||||||
|
private String remark;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ public class HistoryPresenter extends BasePresenter<HistoryContract.HistoryView>
|
|||||||
map.put("pageNum",mCurrentPage+"");
|
map.put("pageNum",mCurrentPage+"");
|
||||||
if(!TextUtils.isEmpty(mFilterStartTime)){
|
if(!TextUtils.isEmpty(mFilterStartTime)){
|
||||||
// map.put("beginTime",mFilterStartTime);
|
// map.put("beginTime",mFilterStartTime);
|
||||||
map.put("param[beginTime]", mFilterStartTime);
|
map.put("params[beginTime]", mFilterStartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!TextUtils.isEmpty(mFilterStartTime)){
|
if(!TextUtils.isEmpty(mFilterStartTime)){
|
||||||
// map.put("endTime",mFilterEndTime);
|
// map.put("endTime",mFilterEndTime);
|
||||||
map.put("param[endTime]", mFilterEndTime);
|
map.put("params[endTime]", mFilterEndTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(mFilterType != -1){
|
if(mFilterType != -1){
|
||||||
|
|||||||
17
app/src/main/res/drawable/anim_connect_ble_device.xml
Normal file
17
app/src/main/res/drawable/anim_connect_ble_device.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:oneshot="false">
|
||||||
|
<item
|
||||||
|
android:drawable="@mipmap/img_add_dev_aini_1"
|
||||||
|
android:duration="300" />
|
||||||
|
<item
|
||||||
|
android:drawable="@mipmap/img_add_dev_aini_2"
|
||||||
|
android:duration="300" />
|
||||||
|
<item
|
||||||
|
android:drawable="@mipmap/img_add_dev_aini_3"
|
||||||
|
android:duration="300" />
|
||||||
|
<item
|
||||||
|
android:drawable="@mipmap/img_add_dev_aini_2"
|
||||||
|
android:duration="500" />
|
||||||
|
|
||||||
|
</animation-list>
|
||||||
@@ -1,33 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:oneshot="false">
|
android:oneshot="false">
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_add_dev_aini_1"
|
|
||||||
android:duration="200" />
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_add_dev_aini_2"
|
|
||||||
android:duration="200" />
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_add_dev_aini_3"
|
|
||||||
android:duration="200" />
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_add_dev_aini_2"
|
|
||||||
android:duration="500" />
|
|
||||||
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_connect_anim_phone1"
|
|
||||||
android:duration="200" />
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_connect_anim_phone2"
|
|
||||||
android:duration="200" />
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_connect_anim_phone3"
|
|
||||||
android:duration="200" />
|
|
||||||
<item
|
|
||||||
android:drawable="@mipmap/img_connect_anim_phone1"
|
|
||||||
android:duration="500" />
|
|
||||||
|
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:drawable="@mipmap/img_connect_anim_wifi1"
|
android:drawable="@mipmap/img_connect_anim_wifi1"
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_connect_animation"
|
android:id="@+id/iv_connect_animation"
|
||||||
android:layout_width="@dimen/dp_200"
|
android:layout_width="@dimen/dp_300"
|
||||||
android:layout_height="@dimen/dp_200"
|
android:layout_height="@dimen/dp_300"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:src="@drawable/anim_add_device_scan"/>
|
android:src="@drawable/anim_add_device_scan"/>
|
||||||
|
|
||||||
|
|||||||
@@ -15,118 +15,141 @@
|
|||||||
layout="@layout/include_activity_back_gray_layout" />
|
layout="@layout/include_activity_back_gray_layout" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textColor="@color/textPrimaryColor"
|
|
||||||
android:text="@string/select_wifi_tip"
|
|
||||||
android:textStyle="bold"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linear_wifi_info"
|
android:id="@+id/linear_wifi_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="@dimen/dp_10">
|
android:visibility="gone">
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/linear_wifi"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="@dimen/dp_50"
|
android:layout_marginLeft="@dimen/dp_20"
|
||||||
android:orientation="horizontal"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
android:layout_marginHorizontal="@dimen/dp_20"
|
android:textSize="20sp"
|
||||||
android:background="@drawable/shape_round_corner_100"
|
android:textColor="@color/textPrimaryColor"
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
android:text="@string/select_wifi_tip"
|
||||||
android:gravity="center_vertical"
|
android:textStyle="bold"/>
|
||||||
android:paddingHorizontal="@dimen/dp_20">
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_24"
|
|
||||||
android:layout_height="@dimen/dp_24"
|
|
||||||
android:src="@mipmap/icon_wifi"/>
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_wifi_name"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="2"
|
|
||||||
android:layout_marginLeft="@dimen/dp_5"
|
|
||||||
android:background="@null"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/textPrimaryColor"
|
|
||||||
android:textColorHint="@color/textPrimaryColor"
|
|
||||||
android:hint="@string/input_wifi_name_tip"/>
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_select_wifi"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1.2"
|
|
||||||
android:background="@drawable/shape_green_50"
|
|
||||||
android:paddingVertical="@dimen/dp_8"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="13sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/select_wifi_tip"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linear_psd"
|
android:id="@+id/linear_wifi_info"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_50"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="vertical"
|
||||||
android:layout_marginHorizontal="@dimen/dp_20"
|
android:layout_marginTop="@dimen/dp_10">
|
||||||
android:background="@drawable/shape_round_corner_100"
|
<LinearLayout
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
android:id="@+id/linear_wifi"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:paddingHorizontal="@dimen/dp_20">
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="@dimen/dp_24"
|
|
||||||
android:layout_height="@dimen/dp_24"
|
|
||||||
android:src="@mipmap/icon_phone_code"/>
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/et_input_psd"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_50"
|
||||||
android:layout_marginLeft="@dimen/dp_5"
|
android:orientation="horizontal"
|
||||||
android:background="@null"
|
android:layout_marginHorizontal="@dimen/dp_20"
|
||||||
android:textSize="14sp"
|
android:background="@drawable/shape_round_corner_100"
|
||||||
android:textColorHint="@color/textPrimaryColor"
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
android:textColor="@color/textPrimaryColor"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/input_wifi_psd_tip"/>
|
android:paddingHorizontal="@dimen/dp_20">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_24"
|
||||||
|
android:layout_height="@dimen/dp_24"
|
||||||
|
android:src="@mipmap/icon_wifi"/>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_wifi_name"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="2"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:background="@null"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/textPrimaryColor"
|
||||||
|
android:textColorHint="@color/textPrimaryColor"
|
||||||
|
android:hint="@string/input_wifi_name_tip"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_select_wifi"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:background="@drawable/shape_green_50"
|
||||||
|
android:paddingVertical="@dimen/dp_8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/select_wifi_tip"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linear_psd"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_50"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_20"
|
||||||
|
android:background="@drawable/shape_round_corner_100"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="@dimen/dp_20">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp_24"
|
||||||
|
android:layout_height="@dimen/dp_24"
|
||||||
|
android:src="@mipmap/icon_phone_code"/>
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/et_input_psd"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp_5"
|
||||||
|
android:background="@null"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColorHint="@color/textPrimaryColor"
|
||||||
|
android:textColor="@color/textPrimaryColor"
|
||||||
|
android:hint="@string/input_wifi_psd_tip"/>
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_wifi_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/button_next"
|
||||||
|
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"
|
||||||
|
android:visibility="gone"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_progress"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/dp_20"
|
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:textColor="@color/textPrimaryColor"
|
|
||||||
android:text="进度"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/rv_wifi_list"
|
<LinearLayout
|
||||||
|
android:id="@+id/linear_connect_ble"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
android:orientation="vertical">
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
<ImageView
|
||||||
android:visibility="gone"/>
|
android:id="@+id/iv_connect_animation"
|
||||||
|
android:layout_width="@dimen/dp_300"
|
||||||
|
android:layout_height="@dimen/dp_300"
|
||||||
|
android:layout_marginTop="@dimen/dp_50"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:src="@drawable/anim_add_device_scan"
|
||||||
|
android:visibility="visible"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textColor="@color/textPrimaryColor"
|
||||||
|
android:text="蓝牙连接中"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_next"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/button_next"
|
|
||||||
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"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -96,6 +96,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingHorizontal="@dimen/dp_15"
|
android:paddingHorizontal="@dimen/dp_15"
|
||||||
|
tools:itemCount="3"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/index_device_list_item" />
|
tools:listitem="@layout/index_device_list_item" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user