Make the manual entry dialog scrollable

Fixes #196
This commit is contained in:
Jakob Nixdorf 2018-07-04 13:48:04 +02:00
parent 18e9c4b69f
commit bea802d27d
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC

View file

@ -1,161 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/activity_margin_large"
android:paddingEnd="@dimen/activity_margin_large">
android:layout_width="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_type"/>
<Spinner
android:id="@+id/manual_type"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_label"/>
<EditText
android:id="@+id/manual_label"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/hint_label"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_secret"/>
<EditText
android:id="@+id/manual_secret"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:lines="3"
android:hint="@string/hint_secret" />
</LinearLayout>
<LinearLayout
android:id="@+id/manual_layout_counter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_counter"/>
<EditText
android:id="@+id/manual_counter"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/label_counter"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_tags"/>
<Button
android:id="@+id/manual_tags"
style="?android:attr/spinnerStyle"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAlignment="textEnd" />
</LinearLayout>
<Button
android:id="@+id/dialog_expand_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_arrow_down_accent"
android:textAlignment="viewStart"
android:text="@string/label_advanced"/>
<com.github.aakira.expandablelayout.ExpandableLinearLayout
android:id="@+id/dialog_expand_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ael_duration="200"
app:ael_interpolator="linear"
app:ael_expanded="false">
<LinearLayout
android:id="@+id/manual_layout_period"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_period"/>
<EditText
android:id="@+id/manual_period"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/label_period"/>
</LinearLayout>
android:layout_height="wrap_content"
android:paddingStart="@dimen/activity_margin_large"
android:paddingEnd="@dimen/activity_margin_large">
<LinearLayout
android:layout_width="match_parent"
@ -167,38 +22,190 @@
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_digits"/>
<EditText
android:id="@+id/manual_digits"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/label_digits"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_algorithm"/>
android:text="@string/label_type"/>
<Spinner
android:id="@+id/manual_algorithm"
android:id="@+id/manual_type"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content" />
</LinearLayout>
</com.github.aakira.expandablelayout.ExpandableLinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
</LinearLayout>
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_label"/>
<EditText
android:id="@+id/manual_label"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/hint_label"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_secret"/>
<EditText
android:id="@+id/manual_secret"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:lines="3"
android:hint="@string/hint_secret" />
</LinearLayout>
<LinearLayout
android:id="@+id/manual_layout_counter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_counter"/>
<EditText
android:id="@+id/manual_counter"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/label_counter"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_tags"/>
<Button
android:id="@+id/manual_tags"
style="?android:attr/spinnerStyle"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAlignment="textEnd" />
</LinearLayout>
<Button
android:id="@+id/dialog_expand_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/ic_arrow_down_accent"
android:textAlignment="viewStart"
android:text="@string/label_advanced"/>
<com.github.aakira.expandablelayout.ExpandableLinearLayout
android:id="@+id/dialog_expand_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:ael_duration="200"
app:ael_interpolator="linear"
app:ael_expanded="false">
<LinearLayout
android:id="@+id/manual_layout_period"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_period"/>
<EditText
android:id="@+id/manual_period"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/label_period"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_digits"/>
<EditText
android:id="@+id/manual_digits"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/label_digits"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
<TextView
android:layout_weight="3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/label_algorithm"/>
<Spinner
android:id="@+id/manual_algorithm"
android:layout_weight="7"
android:layout_width="0dp"
android:layout_height="wrap_content" />
</LinearLayout>
</com.github.aakira.expandablelayout.ExpandableLinearLayout>
</LinearLayout>
</ScrollView>