mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 17:35:54 +08:00
添加安卓端基本功能
This commit is contained in:
23
android/app/src/main/res/layout/activity_agent_web.xml
Normal file
23
android/app/src/main/res/layout/activity_agent_web.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/container_frame_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</FrameLayout>
|
||||
26
android/app/src/main/res/layout/activity_main.xml
Normal file
26
android/app/src/main/res/layout/activity_main.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:openDrawer="start">
|
||||
|
||||
<!-- 主内容填充 -->
|
||||
<include
|
||||
layout="@layout/layout_main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 侧边栏 -->
|
||||
<com.google.android.material.navigation.NavigationView
|
||||
android:id="@+id/nav_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/include_navigation_header"
|
||||
app:menu="@menu/menu_drawer" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
51
android/app/src/main/res/layout/adapter_button_top_item.xml
Normal file
51
android/app/src/main/res/layout/adapter_button_top_item.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/device_item_all_open"
|
||||
style="@style/SuperButton.Blue.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:enabled="true"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="全开"
|
||||
app:sCornersRadius="3dp"
|
||||
app:sSelectorNormalColor="@color/success"
|
||||
app:sSelectorPressedColor="@color/info" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/device_item_all_close"
|
||||
style="@style/SuperButton.Blue.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:enabled="true"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="全关"
|
||||
app:sCornersRadius="3dp"
|
||||
app:sSelectorNormalColor="@color/danger"
|
||||
app:sSelectorPressedColor="@color/info" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/device_item_add_in_group"
|
||||
style="@style/SuperButton.Blue.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:drawableStart="@drawable/add_device"
|
||||
android:drawablePadding="7dp"
|
||||
android:enabled="true"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="添加设备"
|
||||
app:sCornersRadius="3dp"
|
||||
app:sSelectorNormalColor="@color/primary"
|
||||
app:sSelectorPressedColor="@color/info" />
|
||||
</LinearLayout>
|
||||
52
android/app/src/main/res/layout/adapter_common_grid_item.xml
Normal file
52
android/app/src/main/res/layout/adapter_common_grid_item.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2020 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ll_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.xuexiang.xui.widget.imageview.RadiusImageView
|
||||
android:id="@+id/riv_item"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
tools:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_title"
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@color/xui_config_color_white"
|
||||
tools:text="菜" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sub_title"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:text="菜单1" />
|
||||
|
||||
|
||||
</com.xuexiang.xui.widget.alpha.XUIAlphaLinearLayout>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/device_item_card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
app:cardBackgroundColor="@color/xui_config_color_white"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="true">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginRight="5dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/device_item_title_icon"
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="@color/toast_normal_tint_color"
|
||||
app:srcCompat="@drawable/water_valve" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="30dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingTop="3dp"
|
||||
android:singleLine="true"
|
||||
android:text="雷达感应灯08"
|
||||
android:textColor="@color/xui_config_color_pure_black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom|start|left"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/device_item_time_icon"
|
||||
android:layout_width="@dimen/config_margin_12dp"
|
||||
android:layout_height="@dimen/config_margin_12dp"
|
||||
android:layout_gravity="bottom"
|
||||
app:srcCompat="@drawable/time_b" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/config_margin_14dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="08:45"
|
||||
android:textColor="@color/xui_config_color_pure_black"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_12dp"
|
||||
android:layout_height="@dimen/config_margin_12dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:tint="@color/danger"
|
||||
app:srcCompat="@drawable/temperature" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_temperature"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/config_margin_14dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="15℃"
|
||||
android:textColor="@color/xui_config_color_pure_black"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_12dp"
|
||||
android:layout_height="@dimen/config_margin_12dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="45dp"
|
||||
android:tint="@color/danger"
|
||||
app:srcCompat="@drawable/humidity" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_humidity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="60%"
|
||||
android:textColor="@color/xui_config_color_pure_black"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginLeft="5dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/device_item_wifi_icon"
|
||||
android:layout_width="@dimen/config_margin_12dp"
|
||||
android:layout_height="@dimen/config_margin_12dp"
|
||||
android:layout_gravity="bottom"
|
||||
app:srcCompat="@drawable/wifi" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_wifi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/config_margin_14dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="在线"
|
||||
android:textColor="@color/xui_config_color_pure_black"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/device_item_state_icon"
|
||||
android:layout_width="@dimen/config_margin_12dp"
|
||||
android:layout_height="@dimen/config_margin_12dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="45dp"
|
||||
app:srcCompat="@drawable/state_b" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="58dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="打开"
|
||||
android:textColor="@color/xui_config_color_pure_black"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="bottom|right">
|
||||
|
||||
<com.xuexiang.xui.widget.button.SwitchIconView
|
||||
android:id="@+id/device_item_switch_button"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:padding="8dp"
|
||||
app:siv_animation_duration="500"
|
||||
app:siv_disabled_alpha=".5"
|
||||
app:siv_disabled_color="@color/info"
|
||||
app:siv_enabled="false"
|
||||
app:siv_no_dash="true"
|
||||
app:siv_tint_color="@color/toast_error_color"
|
||||
app:srcCompat="@drawable/power" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
<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:gravity="center_vertical"
|
||||
android:minHeight="?attr/listPreferredItemHeight"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="?attr/xui_config_content_spacing_horizontal"
|
||||
android:paddingEnd="?attr/xui_config_content_spacing_horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_title"
|
||||
style="@style/TextStyle.Title"
|
||||
tools:text="主标题" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sub_title"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_marginTop="4dp"
|
||||
tools:text="副标题" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2020 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:cardBackgroundColor="@color/xui_config_color_white"
|
||||
app:cardCornerRadius="8dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:contentPaddingBottom="10dp"
|
||||
app:contentPaddingLeft="16dp"
|
||||
app:contentPaddingRight="16dp"
|
||||
app:contentPaddingTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.xuexiang.xui.widget.imageview.RadiusImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
app:riv_is_circle="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="xuexiangjys"
|
||||
android:textColor="@color/xui_config_color_pure_black" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tag"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:text="Java" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_title"
|
||||
style="@style/TextStyle.Content"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:maxLines="2"
|
||||
android:singleLine="false"
|
||||
android:text="深度解析RocketMQ消息发送的高可用设计"
|
||||
android:textColor="@color/xui_config_color_pure_black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_summary"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start|center_vertical"
|
||||
android:maxLines="2"
|
||||
android:singleLine="false"
|
||||
android:text="从rocketmq topic的创建机制可知,一个topic对应有多个消息队列,那么我们在发送消息时,是如何选择消息队列进行发送的?"
|
||||
android:textColor="?attr/xui_config_color_content_text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.imageview.RadiusImageView
|
||||
android:id="@+id/iv_image"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/xui_ic_default_img"
|
||||
app:riv_border_width="0dp"
|
||||
app:riv_corner_radius="5dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_praise"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/ic_praise" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_praise"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="点赞" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_comment"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="30dp"
|
||||
android:src="@drawable/ic_comment" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_comment"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="评论" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_read"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:text="阅读量 123" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
45
android/app/src/main/res/layout/adapter_title_item.xml
Normal file
45
android/app/src/main/res/layout/adapter_title_item.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2020 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_title"
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
tools:text="标题" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_action"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
tools:text="更多" />
|
||||
|
||||
</FrameLayout>
|
||||
135
android/app/src/main/res/layout/dialog_guide_tips.xml
Normal file
135
android/app/src/main/res/layout/dialog_guide_tips.xml
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="72dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:padding="@dimen/config_margin_10dp"
|
||||
app:srcCompat="@drawable/ic_action_close_white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/config_margin_10dp"
|
||||
android:layout_marginTop="@dimen/config_margin_16dp"
|
||||
android:layout_marginEnd="@dimen/config_margin_10dp"
|
||||
android:background="@drawable/bg_dialog_common_tip_corner_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/config_margin_10dp"
|
||||
android:paddingEnd="@dimen/config_margin_10dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_top"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/config_margin_8dp"
|
||||
android:layout_marginEnd="@dimen/config_margin_8dp"
|
||||
app:srcCompat="@drawable/img_guide_tip_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_item_title"
|
||||
style="@style/TextStyle.Content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/config_margin_16dp"
|
||||
android:text="@string/tip_title"
|
||||
android:textColor="?attr/colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/config_margin_10dp"
|
||||
android:background="@color/config_color_select_bg"
|
||||
android:gravity="start|center_vertical"
|
||||
android:lineSpacingExtra="@dimen/config_margin_8dp"
|
||||
android:paddingStart="@dimen/config_margin_20dp"
|
||||
android:paddingTop="@dimen/config_margin_10dp"
|
||||
android:paddingEnd="@dimen/config_margin_20dp"
|
||||
android:paddingBottom="@dimen/config_margin_10dp"
|
||||
android:singleLine="false"
|
||||
android:textColor="@color/xui_config_color_primary_text"
|
||||
tools:text="获取更多资讯,欢迎关注我的wumei:【我的Android开源之旅】" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/config_margin_8dp"
|
||||
android:layout_marginBottom="@dimen/config_margin_8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cb_ignore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/icon_checkbox" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_marginStart="@dimen/config_margin_8dp"
|
||||
android:text="@string/tip_ignore_message" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="@dimen/config_margin_5dp"
|
||||
android:background="?attr/xui_config_color_separator_light" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaTextView
|
||||
android:id="@+id/tv_previous"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/label_previous"
|
||||
android:textColor="@color/xui_config_color_primary_text" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/xui_config_color_separator_light" />
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaTextView
|
||||
android:id="@+id/tv_next"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/label_next"
|
||||
android:textColor="@color/xui_config_color_primary_text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
74
android/app/src/main/res/layout/fragment_about.xml
Normal file
74
android/app/src/main/res/layout/fragment_about.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout style="@style/PullDownStyle">
|
||||
|
||||
<androidx.core.widget.NestedScrollView style="@style/ScrollViewStyle">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="40dp"
|
||||
android:paddingBottom="25dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="187dp"
|
||||
android:layout_height="57dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:contentDescription="Logo"
|
||||
app:srcCompat="@drawable/logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textColor="@color/xui_config_color_gray_3"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.xuexiang.xui.widget.grouplist.XUIGroupListView
|
||||
android:id="@+id/about_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="35dp" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_copyright"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:textColor="@color/xui_config_color_gray_7" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
172
android/app/src/main/res/layout/fragment_add_device.xml
Normal file
172
android/app/src/main/res/layout/fragment_add_device.xml
Normal file
@@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/xui_config_color_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/add_device_title"
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="WIFI网络设置"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/wifi" />
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/ssid_spinner"
|
||||
style="@style/Material.SpinnerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="?attr/xui_config_content_spacing_vertical"
|
||||
android:text="请选择WIFI网络" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/wifi_password_icon"
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tag="show"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/show" />
|
||||
|
||||
<com.xuexiang.xui.widget.edittext.materialedittext.MaterialEditText
|
||||
android:id="@+id/wifi_password_txt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="57dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:hint="请输入WIFI密码"
|
||||
app:met_clearButton="true"
|
||||
app:met_errorMessage="WIFI密码无效"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelText="WIFI密码"
|
||||
app:met_passWordButton="true" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:gravity="center_vertical"
|
||||
android:inputType="textMultiLine"
|
||||
android:text="目前仅支持2.4GHz的WIFI网络"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/remember_passord_radio"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:checked="true"
|
||||
android:text="记住密码"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/advance_frame_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="选项"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/advance_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="@dimen/config_margin_30dp"
|
||||
android:layout_marginTop="5dp"
|
||||
app:srcCompat="@drawable/down" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/advance_linear_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/packageModeGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/packageBroadcast"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/esptouch1_package_broadcast" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/packageMulticast"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/esptouch1_package_multicast" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/messageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="top"
|
||||
android:textColor="@android:color/holo_red_dark" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/add_device_next_btn"
|
||||
style="@style/SuperButton.Primary.Login"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="下一步" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
147
android/app/src/main/res/layout/fragment_add_device_two.xml
Normal file
147
android/app/src/main/res/layout/fragment_add_device_two.xml
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/xui_config_color_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="设备信息"
|
||||
android:textSize="24sp" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/name" />
|
||||
|
||||
<com.xuexiang.xui.widget.edittext.materialedittext.MaterialEditText
|
||||
android:id="@+id/device_name_txt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:hint="请输入自定义名称"
|
||||
app:met_clearButton="true"
|
||||
app:met_errorMessage="设备名称无效"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelText="设备名称" />
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/group" />
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/device_group_spinner"
|
||||
style="@style/Material.SpinnerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="?attr/xui_config_content_spacing_vertical"
|
||||
android:text="请选择自定义分组" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/category" />
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/device_category_spinner"
|
||||
style="@style/Material.SpinnerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="?attr/xui_config_content_spacing_vertical"
|
||||
android:text="请选择分类" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="@color/toast_error_color"
|
||||
app:srcCompat="@drawable/sensors" />
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/sensor_one"
|
||||
style="@style/Material.SpinnerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="?attr/xui_config_content_spacing_vertical"
|
||||
android:text="请选择第一路传感器" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="@dimen/config_margin_24dp"
|
||||
android:layout_height="@dimen/config_margin_24dp"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="@color/toast_error_color"
|
||||
app:srcCompat="@drawable/sensors" />
|
||||
|
||||
<com.xuexiang.xui.widget.spinner.materialspinner.MaterialSpinner
|
||||
android:id="@+id/sensor_two"
|
||||
style="@style/Material.SpinnerStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="?attr/xui_config_content_spacing_vertical"
|
||||
android:text="请选择第二路传感器" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/add_device_complete_btn"
|
||||
style="@style/SuperButton.Primary.Login"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="完 成" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
24
android/app/src/main/res/layout/fragment_agentweb.xml
Normal file
24
android/app/src/main/res/layout/fragment_agentweb.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/include_toolbar_web" />
|
||||
|
||||
</LinearLayout>
|
||||
34
android/app/src/main/res/layout/fragment_device.xml
Normal file
34
android/app/src/main/res/layout/fragment_device.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/xui_config_color_white"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
style="@style/TabLayoutStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
14
android/app/src/main/res/layout/fragment_edit_device.xml
Normal file
14
android/app/src/main/res/layout/fragment_edit_device.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="设备编辑" />
|
||||
|
||||
</LinearLayout>
|
||||
14
android/app/src/main/res/layout/fragment_feedback.xml
Normal file
14
android/app/src/main/res/layout/fragment_feedback.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/menu_feedback" />
|
||||
|
||||
</LinearLayout>
|
||||
14
android/app/src/main/res/layout/fragment_group.xml
Normal file
14
android/app/src/main/res/layout/fragment_group.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/menu_left_share_device" />
|
||||
|
||||
</LinearLayout>
|
||||
203
android/app/src/main/res/layout/fragment_login.xml
Normal file
203
android/app/src/main/res/layout/fragment_login.xml
Normal file
@@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="181dp"
|
||||
android:layout_height="130dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:srcCompat="@drawable/logo" />
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="登 录"
|
||||
android:textSize="30sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/ic_phone" />
|
||||
|
||||
<com.xuexiang.xui.widget.edittext.materialedittext.MaterialEditText
|
||||
android:id="@+id/et_phone_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="36dp"
|
||||
android:hint="@string/tip_please_input_phone_number"
|
||||
android:inputType="number"
|
||||
app:met_clearButton="true"
|
||||
app:met_errorMessage="@string/tip_phone_number_error"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelText="@string/title_phone_number"
|
||||
app:met_regexp="@string/regex_phone_number" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_verify_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:tint="?attr/colorAccent"
|
||||
app:srcCompat="@drawable/ic_password" />
|
||||
|
||||
<com.xuexiang.xui.widget.edittext.materialedittext.MaterialEditText
|
||||
android:id="@+id/et_verify_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="36dp"
|
||||
android:hint="@string/hint_please_input_verify_code"
|
||||
android:inputType="number"
|
||||
app:met_clearButton="false"
|
||||
app:met_errorMessage="@string/tip_verify_code_error"
|
||||
app:met_floatingLabel="normal"
|
||||
app:met_floatingLabelText="@string/lab_verify_code"
|
||||
app:met_maxCharacters="4"
|
||||
app:met_regexp="@string/regex_verify_code" />
|
||||
|
||||
<com.xuexiang.xui.widget.button.roundbutton.RoundButton
|
||||
android:id="@+id/btn_get_verify_code"
|
||||
style="@style/RoundButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="@string/action_get_verify_code"
|
||||
android:textColor="@color/selector_round_button_main_theme_color"
|
||||
android:textSize="13sp"
|
||||
app:rb_borderColor="@color/selector_round_button_main_theme_color"
|
||||
app:rb_borderWidth="1.5dp"
|
||||
app:rb_radius="15dp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaTextView
|
||||
android:id="@+id/tv_other_login"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_gravity="start"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="其他登录方式"
|
||||
android:textColor="@color/xui_config_color_primary_text"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaTextView
|
||||
android:id="@+id/tv_forget_password"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_gravity="end"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="忘记密码"
|
||||
android:textColor="@color/xui_config_color_primary_text"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperButton
|
||||
android:id="@+id/btn_login"
|
||||
style="@style/SuperButton.Primary.Login"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/title_login_register" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="登陆/注册代表您已阅读并同意"
|
||||
android:textColor="@color/xui_config_color_primary_text" />
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaTextView
|
||||
android:id="@+id/tv_user_protocol"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="用户协议"
|
||||
android:textColor="?attr/colorAccent" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="和"
|
||||
android:textColor="@color/xui_config_color_primary_text" />
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaTextView
|
||||
android:id="@+id/tv_privacy_protocol"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="隐私政策"
|
||||
android:textColor="?attr/colorAccent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
14
android/app/src/main/res/layout/fragment_message.xml
Normal file
14
android/app/src/main/res/layout/fragment_message.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/menu_message" />
|
||||
|
||||
</LinearLayout>
|
||||
52
android/app/src/main/res/layout/fragment_news.xml
Normal file
52
android/app/src/main/res/layout/fragment_news.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/xui_config_color_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:srlEnableAutoLoadMore="true"
|
||||
app:srlEnableLoadMore="true">
|
||||
|
||||
<com.scwang.smartrefresh.header.MaterialHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
tools:listitem="@layout/adapter_news_card_view_list_item" />
|
||||
|
||||
<!-- 注意修改包名时,这里也需要修改 -->
|
||||
<com.kerwin.wumei.widget.MaterialFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
85
android/app/src/main/res/layout/fragment_profile.xml
Normal file
85
android/app/src/main/res/layout/fragment_profile.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout style="@style/PullDownStyle">
|
||||
|
||||
<androidx.core.widget.NestedScrollView style="@style/ScrollViewStyle">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
style="@style/InfoItem.Account"
|
||||
android:layout_height="60dp"
|
||||
app:sLeftTextString="头像">
|
||||
|
||||
<com.xuexiang.xui.widget.imageview.RadiusImageView
|
||||
android:id="@+id/riv_head_pic"
|
||||
style="@style/RadiusImageView.Circle"
|
||||
android:layout_width="38dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/sRightImgId"
|
||||
app:srcCompat="@drawable/ic_default_head" />
|
||||
|
||||
</com.xuexiang.xui.widget.textview.supertextview.SuperTextView>
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
style="@style/InfoItem.Account"
|
||||
app:sLeftTextString="账号" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_message"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sLeftTextString="消息" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
style="@style/InfoItem.Account"
|
||||
app:sDividerLineType="none"
|
||||
app:sLeftTextString="收藏" />
|
||||
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_feedback"
|
||||
style="@style/InfoItem.Account"
|
||||
android:layout_marginTop="20dp"
|
||||
app:sLeftTextString="意见反馈" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_settings"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sLeftTextString="设置" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_about"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sDividerLineType="none"
|
||||
app:sLeftTextString="关于" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
30
android/app/src/main/res/layout/fragment_pulldown_web.xml
Normal file
30
android/app/src/main/res/layout/fragment_pulldown_web.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/refreshLayout"
|
||||
style="@style/PullDownStyle">
|
||||
|
||||
<com.kerwin.wumei.core.webview.LollipopFixedWebView
|
||||
android:id="@+id/webView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/xui_config_color_white"
|
||||
android:overScrollMode="never"
|
||||
android:visibility="visible" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
35
android/app/src/main/res/layout/fragment_scene.xml
Normal file
35
android/app/src/main/res/layout/fragment_scene.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/xui_config_color_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:srlEnableAutoLoadMore="true"
|
||||
app:srlEnableLoadMore="true">
|
||||
|
||||
<com.scwang.smartrefresh.header.MaterialHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
tools:listitem="@layout/adapter_news_card_view_list_item" />
|
||||
|
||||
<!-- 注意修改包名时,这里也需要修改 -->
|
||||
<com.kerwin.wumei.widget.MaterialFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
75
android/app/src/main/res/layout/fragment_settings.xml
Normal file
75
android/app/src/main/res/layout/fragment_settings.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout style="@style/PullDownStyle">
|
||||
|
||||
<androidx.core.widget.NestedScrollView style="@style/ScrollViewStyle">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="20dp">
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_common"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sLeftTextString="通用" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_privacy"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sLeftTextString="隐私" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_push"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sLeftTextString="推送" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_helper"
|
||||
style="@style/InfoItem.Account"
|
||||
app:sDividerLineType="none"
|
||||
app:sLeftTextString="帮助" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_change_account"
|
||||
style="@style/InfoItem"
|
||||
android:layout_marginTop="16dp"
|
||||
app:sCenterTextString="切换账号"
|
||||
app:sDividerLineType="none" />
|
||||
|
||||
<com.xuexiang.xui.widget.textview.supertextview.SuperTextView
|
||||
android:id="@+id/menu_logout"
|
||||
style="@style/InfoItem"
|
||||
android:layout_marginTop="16dp"
|
||||
app:sCenterTextColor="@color/xui_config_color_red"
|
||||
app:sCenterTextString="退出登录"
|
||||
app:sDividerLineType="none" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
14
android/app/src/main/res/layout/fragment_share_device.xml
Normal file
14
android/app/src/main/res/layout/fragment_share_device.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/menu_left_share_device" />
|
||||
|
||||
</LinearLayout>
|
||||
57
android/app/src/main/res/layout/fragment_simple_tab.xml
Normal file
57
android/app/src/main/res/layout/fragment_simple_tab.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:srlEnableAutoLoadMore="true"
|
||||
app:srlEnableLoadMore="true"
|
||||
app:srlEnableLoadMoreWhenContentNotFull="true">
|
||||
|
||||
<com.scwang.smartrefresh.header.MaterialHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbarSize="4dp"
|
||||
tools:listitem="@layout/adapter_device_card_view_list_item" />
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_title"-->
|
||||
<!-- style="@style/TextStyle.Title"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- tools:text="这里是xx页面" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tv_explain"-->
|
||||
<!-- style="@style/TextStyle.Explain"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginTop="20dp"-->
|
||||
<!-- tools:text="这里是xx页面描述" />-->
|
||||
|
||||
<!-- 注意修改包名时,这里也需要修改 -->
|
||||
<com.kerwin.wumei.widget.MaterialFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="48dp"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.xuexiang.xui.widget.banner.widget.banner.SimpleImageBanner xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/sib_simple_usage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:bb_scale="0.5625"/>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/nav_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorAccent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp">
|
||||
|
||||
<com.xuexiang.xui.widget.imageview.RadiusImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
app:riv_border_color="@color/xui_config_color_gray_6"
|
||||
app:riv_border_width="1px"
|
||||
app:riv_is_circle="true"
|
||||
app:riv_selected_border_color="@color/xui_config_color_gray_4"
|
||||
app:riv_selected_border_width="1px"
|
||||
app:riv_selected_mask_color="@color/xui_config_color_gray_8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_avatar"
|
||||
style="@style/TextStyle.Title"
|
||||
android:layout_marginStart="?attr/xui_config_content_spacing_horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sign"
|
||||
style="@style/TextStyle.Explain"
|
||||
android:layout_width="240dp"
|
||||
android:layout_marginTop="?attr/xui_config_content_spacing_vertical"
|
||||
android:gravity="start"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:singleLine="false" />
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
77
android/app/src/main/res/layout/include_toolbar_web.xml
Normal file
77
android/app/src/main/res/layout/include_toolbar_web.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/xui_actionbar_height"
|
||||
android:background="?attr/colorAccent"
|
||||
app:contentInsetLeft="0dp"
|
||||
app:contentInsetStart="0dp"
|
||||
app:titleTextColor="@android:color/white">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorAccent">
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_web_back" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_toEndOf="@id/iv_back"
|
||||
android:background="@color/xui_config_color_white" />
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaImageView
|
||||
android:id="@+id/iv_finish"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toEndOf="@id/view_line"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_web_close" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.xuexiang.xui.widget.alpha.XUIAlphaImageView
|
||||
android:id="@+id/iv_more"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_web_more" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
61
android/app/src/main/res/layout/layout_main_content.xml
Normal file
61
android/app/src/main/res/layout/layout_main_content.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
~
|
||||
-->
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
app:elevation="0dp">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:minHeight="56dp"
|
||||
app:maxButtonHeight="56dp"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
app:titleTextColor="@color/xui_config_color_white" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<!-- ViewPager,页面填充页 -->
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="?actionBarSize"
|
||||
android:layout_marginBottom="?actionBarSize"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_navigation"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/xui_config_color_white"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:menu="@menu/menu_navigation_bottom" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user