| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- tools:context=".MainActivity">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1.2"
- android:background="@color/holo_blue_light"
- >
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@color/white"
- android:id="@+id/logview"
- android:layout_marginTop="10dp"
- android:layout_marginStart="0dp"
- >
- <TextView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="10dp"
- android:layout_marginEnd="10dp"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textColor="@color/black"
- android:textSize="30sp"
- android:text="日志">
- </TextView>
- </LinearLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginStart="100dp"
- android:layout_marginEnd="100dp"
- android:layout_marginTop="60dp"
- android:layout_marginBottom="30dp"
- android:gravity="center"
- >
- <RelativeLayout
- android:id="@+id/logLayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fadeScrollbars="false"
- android:scrollbars="vertical"
- android:gravity="center"
- android:textColor="#000000"
- android:textSize="80sp"
- android:background="@drawable/bg_account_shape">
- <ListView
- android:id="@+id/listLog"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:stackFromBottom="false"
- android:transcriptMode="alwaysScroll"
- android:visibility="invisible"
- >
- </ListView>
- </RelativeLayout>
- </RelativeLayout>
- </RelativeLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:background="@color/holo_blue_light"
- android:layout_weight="1"
- android:layout_height="0dp"
- >
- <LinearLayout
- android:id="@+id/controlView"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@color/white"
- android:layout_marginTop="10dp"
- android:layout_marginStart="0dp"
- >
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="10dp"
- android:layout_marginEnd="10dp"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textSize="30sp"
- android:textColor="@color/black"
- android:text="控制"
- >
- </TextView>
- </LinearLayout>
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/controlView"
- android:layout_marginTop="40dp"
- >
- <TextView
- android:id="@+id/tempText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="0dp"
- android:textColor="@color/black"
- android:textSize="30sp"
- android:text="温度:">
- </TextView>
- <TextView
- android:id="@+id/temp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/tempText"
- android:layout_marginStart="10dp"
- android:textColor="@color/black"
- android:textSize="30sp"
- android:text="0.0"/>
- </RelativeLayout>
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- >
- <RelativeLayout
- android:id="@+id/operate"
- android:layout_width="match_parent"
- android:layout_marginStart="150dp"
- android:layout_marginEnd="150dp"
- android:background="@drawable/bg_account_shape"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_centerVertical="true">
- <Spinner
- android:id="@+id/serial"
- android:layout_width="150dp"
- android:layout_marginTop="0dp"
- android:layout_height="70dp"
- style="@style/Spinner"
- android:gravity="center"
- android:background="@drawable/bg_spin_normal"
- />
- <Spinner
- android:id="@+id/baute"
- android:gravity="center"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_marginTop="0dp"
- android:layout_toEndOf="@id/serial"
- android:background="@drawable/bg_spin_normal"
- style="@style/Spinner"
- android:layout_marginStart="40dp" />
- <Button
- android:id="@+id/openSerial"
- android:background="@drawable/bg_btn_button"
- android:text="@string/openserial"
- android:layout_marginTop="0dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_toEndOf="@id/baute"
- android:layout_marginStart="40dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/closeSerial"
- android:background="@drawable/bg_btn_button"
- android:text="@string/closeSerial"
- android:layout_marginTop="0dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_toEndOf="@id/baute"
- android:layout_marginStart="40dp"
- android:visibility="invisible"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/clearLog"
- android:background="@drawable/bg_btn_button"
- android:text="@string/clearLog"
- android:layout_marginTop="0dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_toEndOf="@id/openSerial"
- android:layout_marginStart="40dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/setAddr"
- android:background="@drawable/bg_btn_button"
- android:text="设备配置"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_below="@+id/serial"
- android:layout_marginTop="40dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/readAddr"
- android:text="设备地址"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_below="@id/setAddr"
- android:textSize="20sp"
- android:layout_marginTop="40dp"
- android:background="@drawable/bg_btn_button"
- />
- <Button
- android:id="@+id/motoTest"
- android:background="@drawable/bg_btn_button"
- android:text="电机测试"
- android:layout_marginTop="40dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:layout_toEndOf="@+id/readAddr"
- android:layout_below="@id/baute"
- android:textSize="20sp"
- android:layout_marginStart="40dp"/>
- <Button
- android:id="@+id/motoStart"
- android:background="@drawable/bg_btn_button"
- android:text="电机启动"
- android:layout_marginTop="40dp"
- android:layout_below="@+id/baute"
- android:layout_toEndOf="@+id/motoTest"
- android:layout_marginStart="40dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/querySerial"
- android:background="@drawable/bg_btn_button"
- android:text="序列号"
- android:layout_marginTop="40dp"
- android:layout_below="@+id/baute"
- android:layout_toEndOf="@+id/motoStart"
- android:layout_marginStart="40dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/queryStatus"
- android:background="@drawable/bg_btn_button"
- android:text="执行状态"
- android:layout_marginTop="40dp"
- android:layout_below="@+id/setAddr"
- android:layout_toEndOf="@+id/readAddr"
- android:layout_marginStart="40dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/controlIn"
- android:background="@drawable/bg_btn_button"
- android:text="开关量输入"
- android:layout_marginTop="40dp"
- android:layout_below="@+id/setAddr"
- android:layout_toEndOf="@+id/queryStatus"
- android:layout_marginStart="40dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:textSize="20sp"
- />
- <Button
- android:id="@+id/controlOut"
- android:background="@drawable/bg_btn_button"
- android:text="开关量输出"
- android:layout_marginTop="40dp"
- android:layout_below="@+id/setAddr"
- android:layout_toEndOf="@+id/controlIn"
- android:layout_marginStart="40dp"
- android:layout_width="150dp"
- android:layout_height="70dp"
- android:textSize="20sp"
- />
- </RelativeLayout>
- </RelativeLayout>
- </RelativeLayout>
- </LinearLayout>
|