Bug 1405215 - Part 2 - Make new Edit Bookmark dialogue scrollable. r?jwu
Otherwise
- the keyboard pushes the toolbar with the "Save" button out of view when entering text into the last input field
- the last input field isn't even accessible in landscape orientation.
MozReview-Commit-ID: 98Si6JfLt9m
--- a/mobile/android/app/src/main/res/layout/bookmark_edit_with_full_page.xml
+++ b/mobile/android/app/src/main/res/layout/bookmark_edit_with_full_page.xml
@@ -17,108 +17,112 @@
android:layout_height="56dp"
android:background="@color/text_and_tabs_tray_grey"
android:minHeight="?actionBarSize"
app:navigationIcon="@drawable/abc_ic_clear_mtrl_alpha"
app:subtitleTextColor="@android:color/white"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:titleTextColor="@android:color/white" />
- <LinearLayout
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:orientation="vertical"
- android:paddingEnd="16dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:paddingStart="16dp">
+ android:layout_height="match_parent">
- <android.support.design.widget.TextInputLayout
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="16dp">
+ android:orientation="vertical"
+ android:paddingEnd="16dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:paddingStart="16dp">
- <EditText
- android:id="@+id/edit_bookmark_name"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:ellipsize="end"
- android:gravity="start"
- android:hint="@string/bookmark_edit_name"
- android:maxLines="1"
- android:singleLine="true"
- android:textColor="@color/text_and_tabs_tray_grey"
- android:textSize="18sp"
- android:focusable="true"
- tools:text="Firefox: About your browser" />
- </android.support.design.widget.TextInputLayout>
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="16dp">
- <android.support.design.widget.TextInputLayout
- android:id="@+id/edit_bookmark_location_layout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="16dp">
+ <EditText
+ android:id="@+id/edit_bookmark_name"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="start"
+ android:hint="@string/bookmark_edit_name"
+ android:maxLines="1"
+ android:singleLine="true"
+ android:textColor="@color/text_and_tabs_tray_grey"
+ android:textSize="18sp"
+ android:focusable="true"
+ tools:text="Firefox: About your browser" />
+ </android.support.design.widget.TextInputLayout>
- <EditText
- android:id="@+id/edit_bookmark_location"
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/edit_bookmark_location_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:ellipsize="end"
- android:gravity="start"
- android:hint="@string/bookmark_edit_location"
- android:inputType="textUri"
- android:maxLines="1"
- android:singleLine="true"
- android:textColor="@color/text_and_tabs_tray_grey"
- android:textSize="18sp" />
- </android.support.design.widget.TextInputLayout>
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="16dp">
- <android.support.design.widget.TextInputLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="16dp">
+ <EditText
+ android:id="@+id/edit_bookmark_location"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="start"
+ android:hint="@string/bookmark_edit_location"
+ android:inputType="textUri"
+ android:maxLines="1"
+ android:singleLine="true"
+ android:textColor="@color/text_and_tabs_tray_grey"
+ android:textSize="18sp" />
+ </android.support.design.widget.TextInputLayout>
- <EditText
- android:id="@+id/edit_parent_folder"
+ <android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:cursorVisible="false"
- android:drawableEnd="@drawable/arrow"
- android:drawableRight="@drawable/arrow"
- android:drawablePadding="8dp"
- android:ellipsize="end"
- android:focusable="false"
- android:focusableInTouchMode="false"
- android:gravity="start"
- android:hint="@string/bookmark_parent_folder"
- android:inputType="none"
- android:maxLines="1"
- android:singleLine="true"
- android:textColor="@color/text_and_tabs_tray_grey"
- android:textSize="18sp" />
- </android.support.design.widget.TextInputLayout>
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="16dp">
- <android.support.design.widget.TextInputLayout
- android:id="@+id/edit_bookmark_keyword_layout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginTop="16dp">
+ <EditText
+ android:id="@+id/edit_parent_folder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:cursorVisible="false"
+ android:drawableEnd="@drawable/arrow"
+ android:drawableRight="@drawable/arrow"
+ android:drawablePadding="8dp"
+ android:ellipsize="end"
+ android:focusable="false"
+ android:focusableInTouchMode="false"
+ android:gravity="start"
+ android:hint="@string/bookmark_parent_folder"
+ android:inputType="none"
+ android:maxLines="1"
+ android:singleLine="true"
+ android:textColor="@color/text_and_tabs_tray_grey"
+ android:textSize="18sp" />
+ </android.support.design.widget.TextInputLayout>
- <EditText
- android:id="@+id/edit_bookmark_keyword"
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/edit_bookmark_keyword_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:ellipsize="end"
- android:gravity="start"
- android:hint="@string/bookmark_edit_keyword"
- android:inputType="textNoSuggestions"
- android:maxLines="1"
- android:singleLine="true"
- android:textColor="@color/text_and_tabs_tray_grey"
- android:textSize="18sp" />
- </android.support.design.widget.TextInputLayout>
- </LinearLayout>
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="16dp">
+
+ <EditText
+ android:id="@+id/edit_bookmark_keyword"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="start"
+ android:hint="@string/bookmark_edit_keyword"
+ android:inputType="textNoSuggestions"
+ android:maxLines="1"
+ android:singleLine="true"
+ android:textColor="@color/text_and_tabs_tray_grey"
+ android:textSize="18sp" />
+ </android.support.design.widget.TextInputLayout>
+ </LinearLayout>
+ </ScrollView>
</LinearLayout>