搭建基础UI控制逻辑框架
This commit is contained in:
parent
870cc3ae5b
commit
ea8623ada8
|
|
@ -27,4 +27,4 @@ android.useAndroidX=true
|
|||
android.useDeprecatedNdk=true
|
||||
|
||||
versionCode=40
|
||||
versionName=4.11.0
|
||||
versionName=4.10.0
|
||||
|
|
@ -188,7 +188,7 @@
|
|||
android:name=".newbind.NewBindDeviceActivity"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Transparent" />
|
||||
android:theme="@style/Theme.AppCompat.NoActionBar" />
|
||||
<activity
|
||||
android:name=".PhoneInfoActivity"
|
||||
android:exported="false"
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ import java.util.List;
|
|||
|
||||
import de.greenrobot.event.EventBus;
|
||||
|
||||
/**
|
||||
* 热点连接
|
||||
*/
|
||||
public class HotSpotConnentActivity extends BaseActivity {
|
||||
private EditText et_wifiname, et_wifipwd;
|
||||
ImageView iv_wifiset;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ import rx.schedulers.Schedulers;
|
|||
* @description:新的绑定摄像头&鱼缸设备界面
|
||||
*/
|
||||
public class NewBindDeviceChoiceActivity extends BaseActivity implements View.OnClickListener {
|
||||
private int TYPE_ONE_BUTTON_CONNECT = 1;
|
||||
private int TYPE_ONE_BUTTON_CONNECT = 1;//airkiss
|
||||
private int TYPE_QUICK_CONNECT = 2;
|
||||
private int TYPE_APP_CONNECT = 3;
|
||||
private TextView tv_connect_type;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
package com.ifish.activity.newbind;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.ifish.activity.R;
|
||||
|
||||
/**
|
||||
* @ClassName: BottomChoiceDialog
|
||||
* @Description: 连接类型底部弹窗
|
||||
* @Author: LiHongda
|
||||
* @CreateDate: 2024/2/22 20:53
|
||||
*/
|
||||
public class BottomChoiceDialog extends DialogFragment implements View.OnClickListener {
|
||||
|
||||
private static BottomChoiceDialog bottomChoiceDialog;
|
||||
|
||||
public static BottomChoiceDialog newInstance(String title, String message) {
|
||||
BottomChoiceDialog dialog = new BottomChoiceDialog();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("title", title);
|
||||
bundle.putString("message", message);
|
||||
dialog.setArguments(bundle);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public static BottomChoiceDialog newInstance() {
|
||||
if (bottomChoiceDialog == null) {
|
||||
bottomChoiceDialog = new BottomChoiceDialog();
|
||||
}
|
||||
return bottomChoiceDialog;
|
||||
}
|
||||
|
||||
private TextView tvSmartConfig;
|
||||
private TextView tvAP;
|
||||
private TextView tvAirKiss;
|
||||
private TextView tvCancel;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
||||
View view = inflater.inflate(R.layout.dialog_choose_connect_wifi_type, container, false);
|
||||
tvSmartConfig = (TextView) view.findViewById(R.id.tv_smartConfig);
|
||||
tvAP = (TextView) view.findViewById(R.id.tv_AP);
|
||||
tvAirKiss = (TextView) view.findViewById(R.id.tv_airkiss);
|
||||
tvCancel = (TextView) view.findViewById(R.id.tv_cancel);
|
||||
|
||||
tvSmartConfig.setOnClickListener(this);
|
||||
tvAP.setOnClickListener(this);
|
||||
tvAirKiss.setOnClickListener(this);
|
||||
tvCancel.setOnClickListener(this);
|
||||
return view;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setCancelable(true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
setStyle(STYLE_NORMAL, R.style.BottomDialogAnimation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
||||
// 不带style的构建的dialog宽度无法铺满屏幕
|
||||
// Dialog dialog = new Dialog(getActivity());
|
||||
Dialog dialog = new Dialog(getActivity(), R.style.CustomDatePickerDialog);
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(R.layout.dialog_choose_connect_wifi_type);
|
||||
dialog.setCanceledOnTouchOutside(true);
|
||||
|
||||
// 设置弹出框布局参数,宽度铺满全屏,底部。
|
||||
Window window = dialog.getWindow();
|
||||
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||
wlp.gravity = Gravity.BOTTOM;
|
||||
wlp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
window.setAttributes(wlp);
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
||||
private OnChooseClickListener chooseClickListener;
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
switch (id) {
|
||||
case R.id.tv_smartConfig:
|
||||
chooseClickListener.smartConfigConnect();
|
||||
dismissAllowingStateLoss();
|
||||
break;
|
||||
case R.id.tv_AP:
|
||||
chooseClickListener.APConnect();
|
||||
dismissAllowingStateLoss();
|
||||
break;
|
||||
case R.id.tv_airkiss:
|
||||
chooseClickListener.AirKissConnect();
|
||||
dismissAllowingStateLoss();
|
||||
break;
|
||||
case R.id.tv_cancel:
|
||||
dismissAllowingStateLoss();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public interface OnChooseClickListener {
|
||||
void smartConfigConnect();//智能连接
|
||||
|
||||
void APConnect();//热点连接
|
||||
|
||||
void AirKissConnect();//airkiss连接
|
||||
}
|
||||
|
||||
public void setOnChooseClickListener(OnChooseClickListener shareClickListener) {
|
||||
this.chooseClickListener = shareClickListener;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.ifish.activity.newbind;
|
||||
|
||||
/**
|
||||
* @ClassName: ConnectType
|
||||
* @Description: 作用描述
|
||||
* @Author: LiHongda
|
||||
* @CreateDate: 2024/2/22 21:22
|
||||
*/
|
||||
public enum ConnectType {
|
||||
APConnect,
|
||||
SmartConfig,
|
||||
AirKiss
|
||||
}
|
||||
|
|
@ -1,19 +1,222 @@
|
|||
package com.ifish.activity.newbind;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.ifish.activity.R;
|
||||
import com.ifish.baseclass.BaseActivity;
|
||||
import com.ifish.utils.ToastUtil;
|
||||
|
||||
/**
|
||||
* @ClassName: NewBindDeviceActivity
|
||||
* @Description: 新版连接界面
|
||||
* @Author: LiHongda
|
||||
* @CreateDate: 2024/2/22 20:45
|
||||
*/
|
||||
public class NewBindDeviceActivity extends AppCompatActivity {
|
||||
|
||||
//----------------控件区--------------------//
|
||||
private TextView tvConnectType;
|
||||
private ProgressBar progressLoading;
|
||||
private LinearLayout llWifiLayout;
|
||||
private LinearLayout llWifi;
|
||||
private TextView tvWifiName;
|
||||
private EditText tvWifiPwd;
|
||||
private TextView tvTips;
|
||||
private LinearLayout lineApTip;
|
||||
private TextView tvOtherConnect;
|
||||
private TextView tvClickButton;
|
||||
private FrameLayout frameAp;
|
||||
private TextView tvApConnectDevice;
|
||||
|
||||
|
||||
//选择连接类型的底部弹窗
|
||||
private BottomChoiceDialog bottomChoiceDialog;
|
||||
|
||||
//----------------变量区--------------------//
|
||||
private ConnectType curConnectType;//当前选择的连接类型
|
||||
|
||||
public class NewBindDeviceActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_new_bind_device_choice);
|
||||
initTitle();
|
||||
initView();
|
||||
initListener();
|
||||
//默认AP连网
|
||||
curConnectType = ConnectType.APConnect;
|
||||
switchUIConnectType(curConnectType);
|
||||
}
|
||||
|
||||
private void initTitle() {
|
||||
TextView title_text = (TextView) findViewById(R.id.title_text);
|
||||
title_text.setText("连接设备");
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
|
||||
bottomChoiceDialog = BottomChoiceDialog.newInstance();
|
||||
|
||||
tvConnectType = (TextView) findViewById(R.id.tv_connect_type);
|
||||
|
||||
frameAp = (FrameLayout) findViewById(R.id.frame_ap);
|
||||
tvApConnectDevice = (TextView) findViewById(R.id.tv_ap_connect_device);
|
||||
progressLoading = (ProgressBar) findViewById(R.id.progress_loading);
|
||||
llWifiLayout = (LinearLayout) findViewById(R.id.ll_wifi_layout);
|
||||
llWifi = (LinearLayout) findViewById(R.id.ll_wifi);
|
||||
tvWifiName = (TextView) findViewById(R.id.tv_wifi_name);
|
||||
tvWifiPwd = (EditText) findViewById(R.id.tv_wifi_pwd);
|
||||
tvTips = (TextView) findViewById(R.id.tv_tips);
|
||||
lineApTip = (LinearLayout) findViewById(R.id.line_ap_tip);
|
||||
tvOtherConnect = (TextView) findViewById(R.id.tv_other_connect);
|
||||
tvClickButton = (TextView) findViewById(R.id.tv_click_button);
|
||||
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
tvOtherConnect.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (bottomChoiceDialog != null && !bottomChoiceDialog.isAdded()) {
|
||||
bottomChoiceDialog.show(getSupportFragmentManager(), "选择连接类型");
|
||||
}
|
||||
}
|
||||
});
|
||||
bottomChoiceDialog.setOnChooseClickListener(new BottomChoiceDialog.OnChooseClickListener() {
|
||||
@Override
|
||||
public void smartConfigConnect() {
|
||||
//智能连接逻辑
|
||||
curConnectType = ConnectType.SmartConfig;
|
||||
switchUIConnectType(curConnectType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void APConnect() {
|
||||
//AP连接逻辑
|
||||
curConnectType = ConnectType.APConnect;
|
||||
switchUIConnectType(curConnectType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void AirKissConnect() {
|
||||
//airKiss逻辑
|
||||
curConnectType = ConnectType.AirKiss;
|
||||
switchUIConnectType(curConnectType);
|
||||
}
|
||||
});
|
||||
tvClickButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//todo 一系列判断逻辑
|
||||
checkAPLayout();
|
||||
connectDevice();
|
||||
}
|
||||
});
|
||||
|
||||
tvApConnectDevice.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
showProgress(true);
|
||||
tvApConnectDevice.setVisibility(View.GONE);
|
||||
//开始AP连接
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "开始AP连接...");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void showProgress(boolean show) {
|
||||
progressLoading.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据当前是不是AP连接更新布局
|
||||
*/
|
||||
public void checkAPLayout() {
|
||||
boolean curIsAP = curConnectType == ConnectType.APConnect;
|
||||
//AP连接的UI需要特殊处理
|
||||
//AP连接按钮
|
||||
frameAp.setVisibility(curIsAP ? View.VISIBLE : View.GONE);
|
||||
//确定&下一步按钮
|
||||
tvClickButton.setVisibility(curIsAP ? View.GONE : View.VISIBLE);
|
||||
//wifi布局
|
||||
llWifiLayout.setVisibility(curIsAP ? View.GONE : View.VISIBLE);
|
||||
//ap连接提示布局
|
||||
lineApTip.setVisibility(curIsAP ? View.VISIBLE : View.GONE);
|
||||
//通用提示布局
|
||||
tvTips.setVisibility(curIsAP ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
private void resetLayout() {
|
||||
//AP连接按钮
|
||||
frameAp.setVisibility(View.GONE);
|
||||
//确定&下一步按钮
|
||||
tvClickButton.setVisibility(View.VISIBLE);
|
||||
//wifi布局
|
||||
llWifiLayout.setVisibility(View.VISIBLE);
|
||||
//ap连接提示布局
|
||||
lineApTip.setVisibility(View.GONE);
|
||||
//通用提示布局
|
||||
tvTips.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据连接类型切换UI
|
||||
* todo 这里的提示应该根据连接类型有不同的提示
|
||||
*
|
||||
* @param connectType
|
||||
*/
|
||||
public void switchUIConnectType(ConnectType connectType) {
|
||||
resetLayout();
|
||||
switch (connectType) {
|
||||
case SmartConfig:
|
||||
// 处理SmartConfig逻辑
|
||||
tvConnectType.setText("智能连网");
|
||||
tvClickButton.setText("确定");
|
||||
tvTips.setText("1、插座仅支持2.4G的WiFi网络,不支持5G及双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键3秒,松手后红灯绿灯同时闪烁,再点确定按钮。\n3、如多次尝试一键连网都不成功,可切换其他连网方式,每次重新连接时插座需断一次电然后重新复位连接。");
|
||||
break;
|
||||
case APConnect:
|
||||
// 处理APConnect逻辑
|
||||
tvConnectType.setText("AP连网");
|
||||
tvClickButton.setText("下一步");
|
||||
tvTips.setText("1、插座仅支持2.4G的WiFi网络,不支持5G及双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键13秒左右,松手后红灯绿灯同时熄灭,只有绿灯偶尔闪烁,再点下一步。");
|
||||
ToastUtil.show(this, "切换到AP连网");
|
||||
break;
|
||||
case AirKiss:
|
||||
tvConnectType.setText("AirKiss连网");
|
||||
ToastUtil.show(this, "AirKiss连网");
|
||||
tvClickButton.setText("确定");
|
||||
tvTips.setText("1、插座仅支持2.4G的WiFi网络,不支持5G及双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键3秒,松手后红灯绿灯同时闪烁,再点确定按钮。\n3、如多次尝试一键连网都不成功,可切换其他连网方式,每次重新连接时插座需断一次电然后重新复位连接。");
|
||||
// 处理AirKiss逻辑
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据连接类型去连接设备
|
||||
*/
|
||||
public void connectDevice() {
|
||||
//根据选择的连网类型跳转不同的逻辑
|
||||
switch (curConnectType) {
|
||||
case SmartConfig:
|
||||
// 处理SmartConfig逻辑
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "开始SmartConfig连网...");
|
||||
break;
|
||||
case APConnect:
|
||||
// 处理APConnect逻辑
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "开始AP连网...");
|
||||
break;
|
||||
case AirKiss:
|
||||
// 处理AirKiss逻辑
|
||||
ToastUtil.show(NewBindDeviceActivity.this, "开始AirKiss连网...");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromYDelta="100%"
|
||||
android:toYDelta="0" />
|
||||
<!-- <alpha-->
|
||||
<!-- android:duration="300"-->
|
||||
<!-- android:fromAlpha="0.0"-->
|
||||
<!-- android:toAlpha="1.0" />-->
|
||||
</set>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<translate
|
||||
android:duration="300"
|
||||
android:fromYDelta="0"
|
||||
android:toYDelta="100%"/>
|
||||
<!-- <alpha-->
|
||||
<!-- android:duration="300"-->
|
||||
<!-- android:fromAlpha="1.0"-->
|
||||
<!-- android:toAlpha="0.0"/>-->
|
||||
</set>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="false" android:drawable="@drawable/connect_device_normal" />
|
||||
<item android:state_pressed="true" android:drawable="@drawable/connect_device_pressed" />
|
||||
</selector>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#65C2C2" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#5ab3b3" />
|
||||
<corners android:radius="6dp" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<corners android:radius="10dp"/>
|
||||
</shape>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
|
|
@ -9,6 +10,12 @@
|
|||
android:id="@+id/in_daohang"
|
||||
layout="@layout/title_layout" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="LHD"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_connect_type"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -17,19 +24,38 @@
|
|||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:text="一键连网"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/shoplist_text_item"
|
||||
android:textSize="17sp" />
|
||||
android:textSize="17sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_loading"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="10dp"
|
||||
<!--AP连网-->
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_ap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="20dp"/>
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ap_connect_device"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@drawable/connect_device"
|
||||
android:gravity="center"
|
||||
android:text="连接设备"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_loading"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!--选择路由器-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_wifi_layout"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -42,16 +68,16 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="选择路由器WIFI"
|
||||
/>
|
||||
android:textColor="#3E3A39" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.1dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#efedee"/>
|
||||
android:background="#efedee" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_wifi"
|
||||
|
|
@ -66,7 +92,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="WIFI"
|
||||
/>
|
||||
android:textColor="#3E3A39" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi_name"
|
||||
|
|
@ -84,11 +110,9 @@
|
|||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.1dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#efedee"/>
|
||||
android:background="#efedee" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_password"
|
||||
|
|
@ -102,7 +126,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="密码" />
|
||||
android:text="密码"
|
||||
android:textColor="#3E3A39" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_wifi_pwd"
|
||||
|
|
@ -111,9 +136,10 @@
|
|||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="请输入WiFi密码"
|
||||
android:textColorHint="#999999"
|
||||
android:textColor="#999999"
|
||||
android:textColorHint="#999999"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -121,11 +147,9 @@
|
|||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.1dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#efedee"/>
|
||||
android:background="#efedee" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -134,34 +158,64 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:textColor="#999999"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:text="1、插座仅支持2.4G的WiFi网络,不支持5G及双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键3秒,松手后红灯绿灯同时闪烁,再点确定按钮。
|
||||
\n3、如多次尝试一键连网都不成功,可切换其他连网方式,每次重新连接时插座需断一次电然后重新复位连接。"/>
|
||||
\n3、如多次尝试一键连网都不成功,可切换其他连网方式,每次重新连接时插座需断一次电然后重新复位连接。"
|
||||
android:textColor="#999999" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/line_ap_tip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:text="@string/ap_connect_tip1"
|
||||
android:textColor="#999999" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:lineSpacingExtra="5dp"
|
||||
android:text="@string/ap_connect_tip2"
|
||||
android:textColor="#999999" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_other_connect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="6dp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="25dp"
|
||||
android:text="其他连网方式"/>
|
||||
android:padding="6dp"
|
||||
android:text="其他连网方式"
|
||||
android:textColor="@color/shoplist_text_item"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_click_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:background="@drawable/login_button_select"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:layout_marginLeft="40dp"
|
||||
android:layout_marginRight="40dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/login_button_select"
|
||||
android:text="确定"/>
|
||||
android:text="确定"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/white_radius10"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_smartConfig"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:text="智能联网"
|
||||
android:textColor="#3E3A39"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="#efedee" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_AP"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:text="AP联网"
|
||||
android:textColor="#3E3A39"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="#efedee" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_airkiss"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:text="AirKiss一键联网"
|
||||
android:textColor="#3E3A39"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="#efedee" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:text="取消"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:textColor="#3E3A39"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -72,4 +72,8 @@
|
|||
<string name="day">日</string>
|
||||
<string name="hour">时</string>
|
||||
<string name="minute">分</string>
|
||||
|
||||
<string name="ap_connect_tip1">1、点击连接设备按钮以后,请耐心等待连接,如提示设备连接失败,请将插座断一次电,然后重新长按复位键13秒左右,再点连接设备</string>
|
||||
<string name="ap_connect_tip2">2、设备连接成功后会进入插座控制界面,过几秒当温度出现时,表示插座联网成功。</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -258,4 +258,15 @@
|
|||
<item name="android:windowExitAnimation">@anim/actionsheet_dialog_out</item>
|
||||
</style>
|
||||
|
||||
<style name="CustomDatePickerDialog" parent="@style/MyAppTheme">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomDialogAnimation">
|
||||
<item name="android:windowEnterAnimation">@anim/bottom_dialog_in</item>
|
||||
<item name="android:windowExitAnimation">@anim/bottom_dialog_out</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in New Issue