diff options
| author | JosJuice <josjuice@gmail.com> | 2022-12-27 16:29:01 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2023-03-07 17:39:30 +0100 |
| commit | c2779aef060137d9062cfd29babb3c43fc5fa2b5 (patch) | |
| tree | 421bbf1ba198ec00b5e7dfe9118da77e079d89c1 /Source/Android/app/src/main/res/layout | |
| parent | 42943672bbbed6c18aa2bc85c41102a0616547f7 (diff) | |
Android: Add the advanced input mapping dialog
It's missing a lot of features from the PC version for now, like
buttons for inserting functions and the ability to see what the
expression evaluates to. I mostly just wanted to get something in
place so you can set up rumble.
Co-authored-by: Charles Lombardo <clombardo169@gmail.com>
Diffstat (limited to 'Source/Android/app/src/main/res/layout')
3 files changed, 137 insertions, 0 deletions
diff --git a/Source/Android/app/src/main/res/layout/dialog_advanced_mapping.xml b/Source/Android/app/src/main/res/layout/dialog_advanced_mapping.xml new file mode 100644 index 0000000000..446851e8fa --- /dev/null +++ b/Source/Android/app/src/main/res/layout/dialog_advanced_mapping.xml @@ -0,0 +1,54 @@ +<?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" + android:paddingHorizontal="@dimen/spacing_large" + android:paddingTop="@dimen/spacing_medlarge"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/list_control" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_above="@+id/expression" + android:layout_alignParentEnd="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/device" /> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/device" + style="@style/Widget.Material3.TextInputLayout.OutlinedBox.ExposedDropdownMenu" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:hint="@string/input_device"> + + <com.google.android.material.textfield.MaterialAutoCompleteTextView + android:id="@+id/dropdown_device" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:inputType="none" /> + + </com.google.android.material.textfield.TextInputLayout> + + <com.google.android.material.textfield.TextInputLayout + android:id="@+id/expression" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:layout_alignParentStart="true" + android:hint="@string/input_expression"> + + <com.google.android.material.textfield.TextInputEditText + android:id="@+id/edit_expression" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="start" + android:importantForAutofill="no" + android:typeface="monospace" /> + + </com.google.android.material.textfield.TextInputLayout> + +</RelativeLayout> diff --git a/Source/Android/app/src/main/res/layout/list_item_advanced_mapping_control.xml b/Source/Android/app/src/main/res/layout/list_item_advanced_mapping_control.xml new file mode 100644 index 0000000000..b5ea979a09 --- /dev/null +++ b/Source/Android/app/src/main/res/layout/list_item_advanced_mapping_control.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="54dp" + android:background="?android:attr/selectableItemBackground" + android:focusable="true" + android:clickable="true"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/TextAppearance.MaterialComponents.Headline5" + tools:text="Button A" + android:layout_alignParentEnd="true" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginStart="@dimen/spacing_large" + android:layout_marginEnd="@dimen/spacing_large" + android:layout_marginTop="@dimen/spacing_large" + android:id="@+id/text_name" + android:textAlignment="viewStart" + android:textSize="16sp" /> + +</RelativeLayout> diff --git a/Source/Android/app/src/main/res/layout/list_item_mapping.xml b/Source/Android/app/src/main/res/layout/list_item_mapping.xml new file mode 100644 index 0000000000..de504d3187 --- /dev/null +++ b/Source/Android/app/src/main/res/layout/list_item_mapping.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout android:id="@+id/root" + 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="wrap_content" + android:background="?android:attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + android:nextFocusRight="@id/button_advanced_settings"> + + <TextView + android:id="@+id/text_setting_name" + style="@style/TextAppearance.MaterialComponents.Headline5" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:layout_marginEnd="@dimen/spacing_large" + android:layout_marginStart="@dimen/spacing_large" + android:layout_marginTop="@dimen/spacing_large" + android:textSize="16sp" + android:textAlignment="viewStart" + android:layout_toStartOf="@+id/button_advanced_settings" + tools:text="Setting Name" /> + + <TextView + android:id="@+id/text_setting_description" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_alignStart="@+id/text_setting_name" + android:layout_below="@+id/text_setting_name" + android:layout_marginBottom="@dimen/spacing_large" + android:layout_marginEnd="@dimen/spacing_large" + android:layout_marginStart="@dimen/spacing_large" + android:layout_marginTop="@dimen/spacing_small" + android:layout_toStartOf="@+id/button_advanced_settings" + android:textAlignment="viewStart" + tools:text="@string/overclock_enable_description" /> + + <Button + android:id="@+id/button_advanced_settings" + style="?attr/materialIconButtonStyle" + android:contentDescription="@string/advanced_settings" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:layout_marginEnd="@dimen/spacing_small" + android:nextFocusLeft="@id/root" + app:icon="@drawable/ic_more" + app:iconTint="?attr/colorOnPrimaryContainer" /> + +</RelativeLayout> |
