kopia lustrzana https://github.com/felHR85/UsbSerial
added layout for synchronous example
rodzic
c2c853d6d6
commit
d15adc3252
|
@ -0,0 +1,93 @@
|
|||
<RelativeLayout 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:paddingBottom="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="16dp"
|
||||
tools:context="com.felhr.serialportexamplesync.MainActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/serial_port"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="34dp"
|
||||
android:background="#FFFFFF"
|
||||
android:scrollbars="vertical"
|
||||
android:gravity="bottom" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/textView1"
|
||||
android:layout_alignRight="@+id/textView1"
|
||||
android:layout_below="@+id/textView1"
|
||||
android:layout_marginTop="28dp"
|
||||
android:ems="10">
|
||||
|
||||
<requestFocus/>
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSend"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/editText1"
|
||||
android:layout_alignRight="@+id/editText1"
|
||||
android:layout_below="@+id/editText1"
|
||||
android:layout_marginTop="42dp"
|
||||
android:text="Send"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonRead"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Read"
|
||||
android:layout_below="@+id/buttonSend"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"/>
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="9600"
|
||||
android:id="@+id/checkBox"
|
||||
android:checked="true"
|
||||
android:layout_below="@+id/buttonRead"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"/>
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="38400"
|
||||
android:id="@+id/checkBox2"
|
||||
android:layout_below="@+id/buttonRead"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Set baud rate"
|
||||
android:id="@+id/buttonBaudrate"
|
||||
android:layout_below="@+id/checkBox"
|
||||
android:layout_alignRight="@+id/checkBox2"
|
||||
android:layout_alignEnd="@+id/checkBox2"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"/>
|
||||
</RelativeLayout>
|
|
@ -1,3 +1,6 @@
|
|||
<resources>
|
||||
<string name="app_name">ExampleSync</string>
|
||||
<string name="hello_world">Hello world!</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="serial_port">Synchronous Serial Port</string>
|
||||
</resources>
|
||||
|
|
Ładowanie…
Reference in New Issue