generated from Grigo/AndroidTemplate
253 lines
11 KiB
XML
253 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/settings_scroll"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fillViewport="true"
|
|
android:padding="16dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="24dp"
|
|
android:gravity="center"
|
|
android:text="@string/interfaces_title"
|
|
android:textAppearance="?attr/textAppearanceHeadlineSmall"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
<!-- UDP -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="?attr/materialCardViewElevatedStyle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
app:cardCornerRadius="12dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="12dp"
|
|
android:text="@string/interfaces_section_udp"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:hint="@string/interfaces_udp_port_hint"
|
|
app:helperText="@string/interfaces_udp_port_helper">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_udp_port"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="number"
|
|
android:text="10110" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_udp_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:checked="true"
|
|
android:text="@string/interfaces_udp_enabled" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- BLE -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="?attr/materialCardViewElevatedStyle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
app:cardCornerRadius="12dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="12dp"
|
|
android:text="@string/interfaces_section_ble"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_ble_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:text="@string/interfaces_ble_enabled" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:hint="@string/interfaces_ble_mac_hint"
|
|
app:helperText="@string/interfaces_ble_mac_helper">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_ble_mac"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_ble_scan"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/interfaces_ble_scan" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_ble_stop_scan"
|
|
style="?attr/materialButtonOutlinedStyle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:text="@string/interfaces_ble_stop" />
|
|
|
|
</LinearLayout>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/rv_ble_devices"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="200dp"
|
|
android:layout_marginTop="8dp" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_ble_battery_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:text="@string/interfaces_ble_battery_enabled" />
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="32dp"
|
|
android:layout_marginTop="4dp"
|
|
android:text="@string/interfaces_ble_battery_helper"
|
|
android:textAppearance="?attr/textAppearanceBodySmall"
|
|
android:textColor="?attr/colorOnSurfaceVariant" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- BLE → UDP Bridge -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="?attr/materialCardViewElevatedStyle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="16dp"
|
|
app:cardCornerRadius="12dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="12dp"
|
|
android:text="@string/interfaces_section_bridge"
|
|
android:textAppearance="?attr/textAppearanceTitleMedium"
|
|
android:textColor="?attr/colorOnSurface" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switch_ble_udp_bridge_enabled"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:text="@string/interfaces_bridge_enabled" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:hint="@string/interfaces_bridge_host_hint">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_ble_udp_host"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text"
|
|
android:text="255.255.255.255" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="@string/interfaces_bridge_port_hint">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/et_ble_udp_port"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="number"
|
|
android:text="10110" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="end"
|
|
android:orientation="horizontal"
|
|
android:paddingTop="8dp"
|
|
android:paddingBottom="8dp">
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_cancel"
|
|
style="?attr/materialButtonOutlinedStyle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="8dp"
|
|
android:text="@string/settings_action_cancel" />
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/btn_save"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/settings_action_save" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|