<?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"
|
android:fitsSystemWindows="false"
|
tools:context=".activity.HomeActivity">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
android:fitsSystemWindows="false"
|
android:orientation="vertical">
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="25dp"
|
android:background="@color/base_color" />
|
|
<include layout="@layout/include_head_home" />
|
|
<FrameLayout
|
android:id="@+id/fragment_container"
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="1" />
|
|
<TextView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="@dimen/dimension_10"
|
android:layout_marginBottom="@dimen/dimension_20"
|
android:gravity="center"
|
android:text="上海兰宝传感科技股份有限公司"
|
android:textColor="@color/dark_hint" />
|
|
</LinearLayout>
|
|
<LinearLayout
|
android:id="@+id/nav_view"
|
android:layout_width="300dp"
|
android:layout_height="match_parent"
|
android:layout_gravity="start"
|
android:background="@color/white"
|
android:clickable="true"
|
android:focusable="true"
|
android:orientation="vertical">
|
|
<!-- 抽屉头部 (左右结构,使用主题色) -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="160dp"
|
android:background="@color/base_color"
|
android:gravity="bottom"
|
android:orientation="horizontal"
|
android:padding="20dp">
|
|
<ImageView
|
android:layout_width="60dp"
|
android:layout_height="60dp"
|
android:src="@mipmap/ic_launcher" />
|
|
<LinearLayout
|
android:layout_width="wrap_content"
|
android:layout_height="60dp"
|
android:layout_marginLeft="15dp"
|
android:gravity="center_vertical"
|
android:orientation="vertical">
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="COMB"
|
android:textColor="@color/white"
|
android:textSize="22sp"
|
android:textStyle="bold" />
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="Shanghai Lanbao Sensing Technology Co., Ltd."
|
android:textColor="@color/white"
|
android:textSize="11sp"
|
android:letterSpacing="0.1" />
|
</LinearLayout>
|
</LinearLayout>
|
|
<!-- 菜单列表 -->
|
<ScrollView
|
android:layout_width="match_parent"
|
android:layout_height="0dp"
|
android:layout_weight="1">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:paddingTop="5dp">
|
|
<!-- 实时监控 -->
|
<LinearLayout
|
android:id="@+id/menu_monitor"
|
android:layout_width="match_parent"
|
android:layout_height="48dp"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingLeft="20dp"
|
android:paddingRight="20dp">
|
|
<ImageView
|
android:layout_width="22dp"
|
android:layout_height="22dp"
|
android:src="@mipmap/icon_record"
|
app:tint="@color/drawer_item_text_gray" />
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="25dp"
|
android:text="实时监控"
|
android:textColor="@color/drawer_item_text_gray"
|
android:textSize="15sp" />
|
</LinearLayout>
|
|
<!-- 蓝牙设备 -->
|
<LinearLayout
|
android:id="@+id/menu_devices"
|
android:layout_width="match_parent"
|
android:layout_height="48dp"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingLeft="20dp"
|
android:paddingRight="20dp">
|
|
<ImageView
|
android:layout_width="22dp"
|
android:layout_height="22dp"
|
android:src="@mipmap/ic_bluetooth"
|
app:tint="@color/drawer_item_text_gray" />
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="25dp"
|
android:text="蓝牙设备"
|
android:textColor="@color/drawer_item_text_gray"
|
android:textSize="15sp" />
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:layout_marginTop="5dp"
|
android:layout_marginBottom="5dp"
|
android:background="@color/drawer_divider" />
|
|
<!-- 参数设定 -->
|
<LinearLayout
|
android:id="@+id/menu_settings"
|
android:layout_width="match_parent"
|
android:layout_height="48dp"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingLeft="20dp"
|
android:paddingRight="20dp">
|
|
<ImageView
|
android:layout_width="22dp"
|
android:layout_height="22dp"
|
android:src="@mipmap/icon_topbar_overflow"
|
app:tint="@color/drawer_item_text_gray" />
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="25dp"
|
android:text="参数设定"
|
android:textColor="@color/drawer_item_text_gray"
|
android:textSize="15sp" />
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:layout_marginTop="5dp"
|
android:layout_marginBottom="5dp"
|
android:background="@color/drawer_divider" />
|
|
<!-- 当前设备 -->
|
<LinearLayout
|
android:id="@+id/menu_current_device"
|
android:layout_width="match_parent"
|
android:layout_height="48dp"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingLeft="20dp"
|
android:paddingRight="20dp">
|
|
<ImageView
|
android:layout_width="22dp"
|
android:layout_height="22dp"
|
android:src="@mipmap/icon_topbar_about"
|
app:tint="@color/drawer_item_text_gray" />
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="25dp"
|
android:text="当前设备"
|
android:textColor="@color/drawer_item_text_gray"
|
android:textSize="15sp" />
|
</LinearLayout>
|
|
<!-- 高级设置 -->
|
<LinearLayout
|
android:id="@+id/menu_advanced_settings"
|
android:layout_width="match_parent"
|
android:layout_height="48dp"
|
android:gravity="center_vertical"
|
android:orientation="horizontal"
|
android:paddingLeft="20dp"
|
android:paddingRight="20dp">
|
|
<ImageView
|
android:layout_width="22dp"
|
android:layout_height="22dp"
|
android:src="@mipmap/icon_topbar_overflow"
|
app:tint="@color/drawer_item_text_gray" />
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginLeft="25dp"
|
android:text="高级设置"
|
android:textColor="@color/drawer_item_text_gray"
|
android:textSize="15sp" />
|
</LinearLayout>
|
|
</LinearLayout>
|
</ScrollView>
|
|
<TextView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginBottom="20dp"
|
android:gravity="center"
|
android:id="@+id/tv_version"
|
android:text="1.0.0"
|
android:textColor="@color/dark_hint"
|
android:textSize="11sp"
|
android:letterSpacing="0.1" />
|
|
</LinearLayout>
|
|
</androidx.drawerlayout.widget.DrawerLayout>
|