Android app updated (now the Android app acts even as client using the
device's accelerometers).
This commit is contained in:
BIN
AndroidExplorerbotServer/res/drawable-hdpi/ic_hardware_phone.png
Normal file
BIN
AndroidExplorerbotServer/res/drawable-hdpi/ic_hardware_phone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 568 B |
BIN
AndroidExplorerbotServer/res/drawable-mdpi/ic_hardware_phone.png
Normal file
BIN
AndroidExplorerbotServer/res/drawable-mdpi/ic_hardware_phone.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 380 B |
Binary file not shown.
After Width: | Height: | Size: 804 B |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
29
AndroidExplorerbotServer/res/layout/activity_client.xml
Normal file
29
AndroidExplorerbotServer/res/layout/activity_client.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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" >
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/drive"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/drive"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/drive"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/exit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:text="Exit" />
|
||||
|
||||
</RelativeLayout>
|
@@ -1,52 +1,50 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="#FF000000"
|
||||
android:orientation="vertical"
|
||||
android:padding="30dp" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/startServer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_hardware_phone"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="30dp"
|
||||
android:background="#FF000000"
|
||||
android:gravity="center" >
|
||||
<ImageButton
|
||||
android:id="@+id/startClient"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@android:color/background_dark"
|
||||
android:padding="20dp"
|
||||
android:src="@drawable/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
<EditText
|
||||
android:id="@+id/ipAddressEditText"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/srv"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
android:background="#FFC0C0C0"
|
||||
android:layout_margin="10dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/text"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/explain" />
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
|
||||
<Button
|
||||
android:id="@+id/killserverbutton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/killserver" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/startvideo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="10dp"
|
||||
android:src="@drawable/ic_device_access_video" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
62
AndroidExplorerbotServer/res/layout/activity_server.xml
Normal file
62
AndroidExplorerbotServer/res/layout/activity_server.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@android:color/background_dark"
|
||||
android:padding="20dp"
|
||||
android:src="@drawable/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/port"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="port"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/killserverbutton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/killserver" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/startvideo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="10dp"
|
||||
android:src="@drawable/ic_device_access_video" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_below="@+id/port"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/explain" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/image"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@string/srv"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
</RelativeLayout>
|
@@ -5,5 +5,7 @@
|
||||
<string name="srv">Server started</string>
|
||||
<string name="explain">Exiting with HOME key will keep the server running. To exit completly press BACK or use the button below.</string>
|
||||
<string name="killserver">Kill server</string>
|
||||
<string name="drive">Activate accelerometer drive</string>
|
||||
<string name="api_requirement_not_satisfied">You need at least Android 3.1 for this feature.</string>
|
||||
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user