updated arduino and android example

This commit is contained in:
strawmanbobi
2025-12-18 20:04:23 +08:00
parent d43ce08fc0
commit af4132e178
21 changed files with 262 additions and 82 deletions

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/sv_control"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/sv_control"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_control_panel"
android:layout_width="match_parent"
@@ -205,8 +208,70 @@
android:scaleType="fitCenter"
android:contentDescription="@string/button_plus"
style="?android:buttonBarButtonStyle"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="4dp"
android:background="#7F7F7F"/>
<CheckBox
android:id="@+id/cb_use_emitter"
android:layout_width="match_parent"
android:layout_height="60dp"
android:textSize="18sp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:text="@string/use_emitter"
android:checked="false"/>
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="2dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
tools:ignore="UselessParent">
<TextView
android:layout_width="wrap_content"
android:layout_height="60dp"
android:gravity="center_vertical"
android:textSize="18sp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="@string/emitter_ip">
</TextView>
<EditText
android:id="@+id/emitter_ip"
android:layout_width="0dp"
android:autofillHints=""
android:gravity="center_vertical"
android:textSize="18sp"
android:hint="@string/default_ip"
android:inputType="text"
android:layout_height="60dp"
android:layout_weight="1">
</EditText>
<ImageButton
android:id="@+id/btn_connection_status"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@mipmap/connect_emitter"
android:scaleType="fitCenter"
android:contentDescription="@string/connect"
style="?android:buttonBarButtonStyle"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_margin="4dp"
android:background="#7F7F7F"/>
</LinearLayout>
</RelativeLayout>