Added profiles for custom layouts.

Users can add severals custom layouts and select one of them in recording fragment. The last selected layout is the one that will be use in the next recording.
Fixes #938.
This commit is contained in:
Román Martínez
2021-10-23 10:04:02 +02:00
parent 02cec48ae4
commit 7f9057c519
28 changed files with 1408 additions and 119 deletions
@@ -0,0 +1,66 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<LinearLayout
android:id="@+id/custom_layout_list_add_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
android:layout_marginBottom="50dp"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/custom_layout_list_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:errorEnabled="true"
android:layout_margin="16dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_layout_list_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapWords"
android:imeOptions="actionDone"
android:hint="@string/custom_layout_list_edit_name" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:id="@+id/custom_layout_list_bottom_bar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:orientation="horizontal">
<Button
android:id="@+id/custom_layout_list_cancel_button"
style="@style/BottomButton"
android:text="@android:string/cancel" />
<Button
android:id="@+id/custom_layout_list_ok_button"
style="@style/BottomButton"
android:text="@android:string/ok" />
</LinearLayout>
<View style="@style/HorizontalLine" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
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"
style="@style/StatsCardView">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp">
<TextView
android:id="@+id/custom_layout_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
tools:text="Profile/Custom Layout Title"
style="@style/LargeLabel"
android:layout_margin="8dp"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>