<?xml version="1.0" encoding="utf-8"?>
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:tools="http://schemas.android.com/tools"
|
android:id="@+id/activity_ctrl"
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
tools:context="com.hdl.sdk.ttl_sdk.activity.MCUActivity">
|
|
<include
|
android:id="@+id/hdl_top_bar_layout"
|
layout="@layout/hdl_toolbar_top_view_b" />
|
|
<ScrollView
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
android:layout_below="@+id/hdl_top_bar_layout">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
|
android:layout_marginLeft="20dp"
|
android:layout_marginRight="20dp"
|
android:orientation="vertical">
|
|
<!--<TextView-->
|
<!--android:layout_width="match_parent"-->
|
<!--android:layout_height="40dp"-->
|
<!--android:gravity="center|left"-->
|
<!--android:text="MCU 协议调试"-->
|
<!--android:textColor="@color/black"-->
|
<!--android:textSize="@dimen/ts_24" />-->
|
<TextView
|
android:layout_width="match_parent"
|
android:layout_height="40dp"
|
android:gravity="center|left"
|
android:text="读写配置"
|
android:textColor="@color/black"
|
android:textSize="@dimen/ts_20" />
|
|
<LinearLayout
|
android:id="@+id/air"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical">
|
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<TextView
|
android:layout_width="80dp"
|
android:layout_height="match_parent"
|
android:gravity="center"
|
android:text="协议类型:" />
|
|
<Spinner
|
android:id="@+id/spinner_type"
|
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
android:minWidth="120dp"></Spinner>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<TextView
|
android:layout_width="80dp"
|
android:layout_height="match_parent"
|
android:gravity="center"
|
android:text="波特率:" />
|
|
<Spinner
|
android:id="@+id/spinner_baudrate"
|
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
android:minWidth="120dp"></Spinner>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<TextView
|
android:layout_width="80dp"
|
android:layout_height="51dp"
|
android:gravity="center"
|
android:text="数据位:" />
|
|
<Spinner
|
android:id="@+id/spinner_dataBit"
|
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
android:minWidth="120dp"></Spinner>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<TextView
|
android:layout_width="80dp"
|
android:layout_height="match_parent"
|
android:gravity="center"
|
android:text="检验位:" />
|
|
<Spinner
|
android:id="@+id/spinner_checkBit"
|
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
android:minWidth="120dp"></Spinner>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<TextView
|
android:layout_width="80dp"
|
android:layout_height="match_parent"
|
android:gravity="center"
|
android:text="停止位:" />
|
|
<Spinner
|
android:id="@+id/spinner_stopBit"
|
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
android:minWidth="120dp"></Spinner>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<Button
|
android:id="@+id/btn_read_config"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="读配置信息" />
|
|
<Button
|
android:id="@+id/btn_write_config"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="写配置信息" />
|
|
</LinearLayout>
|
|
<TextView
|
android:id="@+id/tv_config_mes"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="5dp"
|
android:text="MCU读写配置演示"
|
android:textSize="@dimen/ts_20" />
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:layout_marginTop="20dp"
|
android:background="@color/black"></View>
|
|
<TextView
|
android:layout_width="match_parent"
|
android:layout_height="40dp"
|
android:gravity="center|left"
|
android:text="升级功能"
|
android:textColor="@color/black"
|
android:textSize="@dimen/ts_20" />
|
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<Button
|
android:id="@+id/btn_update"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:enabled="false"
|
android:text="请求升级" />
|
|
<ImageView
|
|
android:layout_width="30dp"
|
android:layout_height="30dp"
|
android:layout_gravity="center"
|
android:layout_marginLeft="5dp"
|
android:gravity="center"
|
android:src="@mipmap/ic_open_bin" />
|
|
<TextView
|
android:id="@+id/tv_select_bin"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:layout_marginLeft="5dp"
|
android:layout_weight="1"
|
android:background="@color/default_bg_2"
|
android:gravity="center|left"
|
android:text="@string/select_bin_frist" />
|
</LinearLayout>
|
|
<TextView
|
android:id="@+id/tv_update_mes"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="5dp"
|
android:text="MCU升级演示"
|
android:textSize="@dimen/ts_20" />
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:layout_marginTop="20dp"
|
android:background="@color/black"></View>
|
|
<TextView
|
android:layout_width="match_parent"
|
android:layout_height="40dp"
|
android:gravity="center|left"
|
android:text="其他操作"
|
android:textColor="@color/black"
|
android:textSize="@dimen/ts_20" />
|
|
<Button
|
android:id="@+id/btn_packet_loss"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="丢包状态检测" />
|
|
<Button
|
android:id="@+id/btn_restart"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="重启MCU" />
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="40dp">
|
|
<Button
|
android:id="@+id/btn_PassThrough"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="发送透传数据"
|
android:visibility="visible"/>
|
<Button
|
android:id="@+id/btn_PassThrough_close"
|
android:layout_width="wrap_content"
|
android:layout_height="40dp"
|
android:text="关闭透传数据"
|
android:visibility="visible"/>
|
|
|
|
</LinearLayout>
|
|
|
<TextView
|
android:id="@+id/tv_other_mes"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="5dp"
|
android:text="MCU其他操作演示"
|
android:textSize="@dimen/ts_20" />
|
</LinearLayout>
|
</LinearLayout>
|
</ScrollView>
|
</RelativeLayout>
|