mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
144 lines
No EOL
6 KiB
XML
144 lines
No EOL
6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/channelNameView"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="64dp"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginEnd="64dp"
|
|
android:hint="@string/channel_name"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/channelNameEdit"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:digits="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890- "
|
|
android:imeOptions="actionDone"
|
|
android:maxLength="15"
|
|
android:singleLine="true"
|
|
android:text="@string/unset" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/qrView"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_marginStart="16dp"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="16dp"
|
|
android:layout_marginBottom="16dp"
|
|
android:contentDescription="@string/qr_code"
|
|
app:layout_constraintBottom_toTopOf="@+id/channelOptions"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/channelNameView"
|
|
app:srcCompat="@drawable/qrcode" />
|
|
|
|
<!--
|
|
geeksville: no longer used but keeping as a good example of a button group. instead I use
|
|
a toggleable icon.
|
|
|
|
<com.google.android.material.button.MaterialButtonToggleGroup
|
|
android:id="@+id/editGroup"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="96dp"
|
|
android:layout_marginTop="16dp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:singleSelection="true"
|
|
app:selectionRequired="true"
|
|
app:layout_constraintTop_toBottomOf="@+id/channelOptions">
|
|
|
|
<Button
|
|
android:id="@+id/locked"
|
|
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
app:icon="@drawable/ic_twotone_lock_24" />
|
|
|
|
<Button
|
|
android:id="@+id/unlocked"
|
|
style="@style/Widget.App.Button.OutlinedButton.IconOnly"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
app:icon="@drawable/ic_twotone_lock_open_24" />
|
|
</com.google.android.material.button.MaterialButtonToggleGroup>
|
|
-->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/channelOptions"
|
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="64dp"
|
|
android:layout_marginEnd="64dp"
|
|
android:layout_marginBottom="16dp"
|
|
android:hint="@string/channel_options"
|
|
app:layout_constraintBottom_toTopOf="@+id/editableCheckbox"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent">
|
|
|
|
<AutoCompleteTextView
|
|
android:id="@+id/filled_exposed_dropdown"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<Button
|
|
android:id="@+id/resetButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="10dp"
|
|
android:text="@string/reset"
|
|
app:layout_constraintBottom_toBottomOf="@id/bottomButtonsGuideline"
|
|
app:layout_constraintEnd_toStartOf="@id/editableCheckbox" />
|
|
|
|
<Button
|
|
android:id="@+id/scanButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:text="@string/scan"
|
|
app:layout_constraintBottom_toBottomOf="@id/bottomButtonsGuideline"
|
|
app:layout_constraintStart_toEndOf="@id/editableCheckbox" />
|
|
|
|
<CheckBox
|
|
android:id="@+id/editableCheckbox"
|
|
android:minWidth="0dp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:button="@drawable/sl_lock_24dp"
|
|
app:layout_constraintBottom_toBottomOf="@id/bottomButtonsGuideline"
|
|
app:layout_constraintLeft_toLeftOf="parent"
|
|
app:layout_constraintRight_toRightOf="parent" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/shareButton"
|
|
style="@android:style/Widget.Material.ImageButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="16dp"
|
|
android:contentDescription="@string/share"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="@id/bottomButtonsGuideline"
|
|
app:srcCompat="@drawable/ic_twotone_share_24" />
|
|
|
|
<androidx.constraintlayout.widget.Guideline
|
|
android:id="@+id/bottomButtonsGuideline"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="32dp"
|
|
android:orientation="horizontal"
|
|
app:layout_constraintGuide_end="16dp" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |