增加新页面
This commit is contained in:
parent
bc5fafab52
commit
196d95f792
|
|
@ -28,8 +28,7 @@
|
|||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<!-- 访问网络 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 访问网络 -->
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
|
||||
|
|
@ -180,6 +179,16 @@
|
|||
android:theme="@style/MyAppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:icon,android:theme,android:allowBackup">
|
||||
<activity
|
||||
android:name=".NewBindDeviceChoiceActivity"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Transparent" />
|
||||
<activity
|
||||
android:name=".newbind.NewBindDeviceActivity"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Transparent" />
|
||||
<activity
|
||||
android:name=".PhoneInfoActivity"
|
||||
android:exported="false"
|
||||
|
|
@ -345,10 +354,6 @@
|
|||
android:name=".BindDeviceChoiceActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Transparent" />
|
||||
<activity
|
||||
android:name=".NewBindDeviceChoiceActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/Transparent" />
|
||||
<activity
|
||||
android:name=".HotSpotConnentDeviceActivity"
|
||||
android:launchMode="singleTop"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import android.view.View;
|
|||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ifish.activity.newbind.NewBindDeviceActivity;
|
||||
import com.ifish.baseclass.BaseActivity;
|
||||
import com.ifish.utils.AnimationUtil;
|
||||
import com.ifish.utils.Commons;
|
||||
|
|
@ -100,7 +101,7 @@ public class BindTwoDeviceActivity extends BaseActivity {
|
|||
return;
|
||||
}
|
||||
}
|
||||
intent.setClass(BindTwoDeviceActivity.this, BindDeviceChoiceActivity.class);
|
||||
intent.setClass(BindTwoDeviceActivity.this, NewBindDeviceChoiceActivity.class);
|
||||
intent.putExtra("devicetype", "camera");
|
||||
intent.putExtra("title", "连接摄像头");
|
||||
startActivity(intent);
|
||||
|
|
@ -130,7 +131,7 @@ public class BindTwoDeviceActivity extends BaseActivity {
|
|||
return;
|
||||
}
|
||||
}
|
||||
intent.setClass(BindTwoDeviceActivity.this, BindDeviceChoiceActivity.class);
|
||||
intent.setClass(BindTwoDeviceActivity.this, NewBindDeviceActivity.class);
|
||||
intent.putExtra("title", "连接水族箱");
|
||||
startActivity(intent);
|
||||
AnimationUtil.startAnimation(BindTwoDeviceActivity.this);
|
||||
|
|
|
|||
|
|
@ -159,7 +159,10 @@ public class HotSpotConnentDeviceCameraActivity extends BaseActivity {
|
|||
private boolean isContinue = true;
|
||||
private Camera userCamera;
|
||||
|
||||
public class ConnectDevice extends CountDownTimer {
|
||||
public class ConnectDevice extends
|
||||
|
||||
|
||||
CountDownTimer {
|
||||
|
||||
public ConnectDevice(long millisInFuture, long countDownInterval) {
|
||||
super(millisInFuture, countDownInterval);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package com.ifish.activity.newbind;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.ifish.activity.R;
|
||||
import com.ifish.baseclass.BaseActivity;
|
||||
|
||||
public class NewBindDeviceActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_new_bind_device_choice);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
<?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="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/in_daohang"
|
||||
layout="@layout/title_layout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_connect_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:text="一键连网"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/shoplist_text_item"
|
||||
android:textSize="17sp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_loading"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="20dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_wifi_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text="选择路由器WIFI"
|
||||
/>
|
||||
|
||||
<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"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_wifi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="WIFI"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wifi_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:text="请输入WiFi名称"
|
||||
android:textColor="#999999"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="密码" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/tv_wifi_pwd"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="请输入WiFi密码"
|
||||
android:textColorHint="#999999"
|
||||
android:textColor="#999999"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
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:text="1、插座仅支持2.4G的WiFi网络,不支持5G及双频合一的网络(需在路由器设置中分开)\n2、先长按插座复位键3秒,松手后红灯绿灯同时闪烁,再点确定按钮。
|
||||
\n3、如多次尝试一键连网都不成功,可切换其他连网方式,每次重新连接时插座需断一次电然后重新复位连接。"/>
|
||||
|
||||
<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="其他连网方式"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_click_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
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="确定"/>
|
||||
|
||||
</LinearLayout>
|
||||
Loading…
Reference in New Issue