mirror of
				https://github.com/mik3y/usb-serial-for-android
				synced 2025-10-31 10:27:27 +00:00 
			
		
		
		
	Demo now consists of two activities:
  - DeviceListActivity shows all usb devices (including unsupported ones)
    in a ListView.
  - SerialConsoleActivity dumps the data stream for a device selected in
    DeviceListActivity.
		
	
			
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="utf-8"?>
 | |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 | |
|     android:layout_width="match_parent"
 | |
|     android:layout_height="match_parent" >
 | |
| 
 | |
|     <TextView
 | |
|         android:id="@+id/demoTitle"
 | |
|         android:layout_width="wrap_content"
 | |
|         android:layout_height="wrap_content"
 | |
|         android:layout_alignParentTop="true"
 | |
|         android:layout_centerHorizontal="true"
 | |
|         android:text="@string/app_title"
 | |
|         android:textSize="24sp"
 | |
|         android:textStyle="bold" />
 | |
| 
 | |
|     <TextView
 | |
|         android:id="@+id/progressBarTitle"
 | |
|         android:layout_width="wrap_content"
 | |
|         android:layout_height="wrap_content"
 | |
|         android:layout_below="@+id/demoTitle"
 | |
|         android:layout_centerHorizontal="true"
 | |
|         android:text="@string/refreshing"
 | |
|         android:padding="8dp"
 | |
|         android:textSize="18sp" />
 | |
|     
 | |
|     <ProgressBar
 | |
|         android:id="@+id/progressBar"
 | |
|         android:layout_width="match_parent"
 | |
|         android:layout_height="wrap_content"
 | |
|         android:layout_below="@+id/progressBarTitle"
 | |
|         android:layout_centerHorizontal="true"
 | |
|         android:padding="8dp"
 | |
|         style="@android:style/Widget.Holo.ProgressBar.Horizontal"
 | |
|         android:indeterminate="true" />
 | |
|     
 | |
|     <View
 | |
|         android:id="@+id/separator"
 | |
|         android:layout_width="match_parent"
 | |
|         android:layout_height="1dip"
 | |
|         android:layout_below="@+id/progressBar"
 | |
|         android:layout_centerHorizontal="true"
 | |
|         android:background="#eeeeee" />
 | |
| 
 | |
|     <ListView
 | |
|         android:id="@+id/deviceList"
 | |
|         android:layout_width="match_parent"
 | |
|         android:layout_height="wrap_content"
 | |
|         android:layout_below="@+id/separator" />
 | |
| 
 | |
| </RelativeLayout> |