Skip to content

Commit 24c4236

Browse files
authored
Make bookmark edit screen scrollable (#6815)
Task/Issue URL: https://app.asana.com/1/137249556945/project/414730916066338/task/1211370193812374?focus=true ### Description Makes edit bookmark screen scrollable. Note: NesterScrollView have issues with DialogFragment so I opted to use ScrollView which seem to work better ### Steps to test this PR _Bookmark with long url (ebay for example)_ - [x] Open an ebay item website, - [x] Add the site as bookmark - [x] Edit the bookmark via Menu > edit bookmark - [x] Verify it’s scrolling (if not increase your font) - [x] Edit the bookmark via Menu > Bookmarks > menu on the site - [x] Verify it’s scrolling (if not increase your font) _Bookmark with short url (ddg for example)_ - [x] Openddg - [x] Add the site as bookmark - [x] Edit the bookmark via Menu > edit bookmark - [x] Verify it’s NOT scrolling - [x] Edit the bookmark via Menu > Bookmarks > menu on the site - [x] Verify it’s NOT scrolling (if not increase your font) Some videos of my testing: https://github.com/user-attachments/assets/3f2f106e-ec3a-419c-8dac-60efa7c9cb0d https://github.com/user-attachments/assets/82473146-023b-4de0-a45e-93a425b6958e https://github.com/user-attachments/assets/ff390b55-26da-456d-af88-a3af84e2611b
1 parent 2e5565a commit 24c4236

File tree

1 file changed

+85
-73
lines changed

1 file changed

+85
-73
lines changed

saved-sites/saved-sites-impl/src/main/res/layout/dialog_fragment_saved_site.xml

Lines changed: 85 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -14,93 +14,105 @@
1414
~ limitations under the License.
1515
-->
1616

17-
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
17+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1818
xmlns:app="http://schemas.android.com/apk/res-auto"
1919
android:layout_width="match_parent"
20-
android:layout_height="match_parent">
20+
android:layout_height="match_parent"
21+
android:orientation="vertical">
2122

2223
<include
2324
android:id="@+id/savedSiteAppBar"
2425
layout="@layout/include_default_toolbar" />
2526

26-
<com.duckduckgo.common.ui.view.text.DaxTextInput
27-
android:id="@+id/titleInput"
27+
<ScrollView
2828
android:layout_width="match_parent"
29-
android:layout_height="wrap_content"
30-
android:layout_margin="@dimen/keyline_4"
31-
android:hint="@string/savedSiteDialogTitleHint"
32-
android:inputType="text|textCapWords"
33-
app:layout_constraintTop_toBottomOf="@id/savedSiteAppBar" />
29+
android:layout_height="match_parent"
30+
android:fillViewport="true">
3431

35-
<com.duckduckgo.common.ui.view.text.DaxTextInput
36-
android:id="@+id/urlInput"
37-
android:layout_width="match_parent"
38-
android:layout_height="wrap_content"
39-
android:layout_margin="@dimen/keyline_4"
40-
android:hint="@string/savedSiteDialogUrlHint"
41-
android:inputType="textUri"
42-
app:layout_constraintTop_toBottomOf="@id/titleInput" />
32+
<androidx.constraintlayout.widget.ConstraintLayout
33+
android:layout_width="match_parent"
34+
android:layout_height="wrap_content">
4335

44-
<com.duckduckgo.common.ui.view.text.DaxTextView
45-
android:id="@+id/savedSiteLocationLabel"
46-
android:layout_width="match_parent"
47-
android:layout_height="wrap_content"
48-
android:layout_marginStart="32dp"
49-
android:layout_marginTop="@dimen/keyline_4"
50-
android:layout_marginEnd="@dimen/keyline_4"
51-
android:text="@string/locationLabel"
52-
app:layout_constraintTop_toBottomOf="@id/urlInput"
53-
app:textType="secondary"
54-
app:typography="caption" />
36+
<com.duckduckgo.common.ui.view.text.DaxTextInput
37+
android:id="@+id/titleInput"
38+
android:layout_width="match_parent"
39+
android:layout_height="wrap_content"
40+
android:layout_margin="@dimen/keyline_4"
41+
android:hint="@string/savedSiteDialogTitleHint"
42+
android:inputType="text|textCapWords"
43+
app:layout_constraintTop_toTopOf="parent" />
5544

56-
<com.duckduckgo.common.ui.view.text.DaxTextView
57-
android:id="@+id/savedSiteLocation"
58-
android:layout_width="match_parent"
59-
android:layout_height="wrap_content"
60-
android:layout_marginStart="@dimen/keyline_4"
61-
android:paddingStart="@dimen/keyline_4"
62-
android:paddingTop="@dimen/keyline_2"
63-
android:paddingEnd="@dimen/keyline_4"
64-
android:paddingBottom="@dimen/keyline_2"
65-
android:text="@string/bookmarksSectionTitle"
66-
app:layout_constraintTop_toBottomOf="@id/savedSiteLocationLabel"
67-
app:typography="body1" />
45+
<com.duckduckgo.common.ui.view.text.DaxTextInput
46+
android:id="@+id/urlInput"
47+
android:layout_width="match_parent"
48+
android:layout_height="wrap_content"
49+
android:layout_margin="@dimen/keyline_4"
50+
android:hint="@string/savedSiteDialogUrlHint"
51+
android:inputType="textUri"
52+
app:layout_constraintTop_toBottomOf="@id/titleInput" />
6853

69-
<androidx.constraintlayout.widget.Group
70-
android:id="@+id/savedSiteLocationContainer"
71-
android:layout_width="wrap_content"
72-
android:layout_height="wrap_content"
73-
android:visibility="gone"
74-
app:constraint_referenced_ids="savedSiteLocationLabel,savedSiteLocation" />
54+
<com.duckduckgo.common.ui.view.text.DaxTextView
55+
android:id="@+id/savedSiteLocationLabel"
56+
android:layout_width="match_parent"
57+
android:layout_height="wrap_content"
58+
android:layout_marginStart="32dp"
59+
android:layout_marginTop="@dimen/keyline_4"
60+
android:layout_marginEnd="@dimen/keyline_4"
61+
android:text="@string/locationLabel"
62+
app:layout_constraintTop_toBottomOf="@id/urlInput"
63+
app:textType="secondary"
64+
app:typography="caption" />
7565

76-
<com.duckduckgo.common.ui.view.divider.HorizontalDivider
77-
android:id="@+id/addToFavoritesBottomDivider"
78-
app:layout_constraintTop_toBottomOf="@id/savedSiteLocation"
79-
android:layout_width="match_parent"
80-
android:layout_height="wrap_content"
81-
android:visibility="gone"/>
66+
<com.duckduckgo.common.ui.view.text.DaxTextView
67+
android:id="@+id/savedSiteLocation"
68+
android:layout_width="match_parent"
69+
android:layout_height="wrap_content"
70+
android:layout_marginStart="@dimen/keyline_4"
71+
android:paddingStart="@dimen/keyline_4"
72+
android:paddingTop="@dimen/keyline_2"
73+
android:paddingEnd="@dimen/keyline_4"
74+
android:paddingBottom="@dimen/keyline_2"
75+
android:text="@string/bookmarksSectionTitle"
76+
app:layout_constraintTop_toBottomOf="@id/savedSiteLocationLabel"
77+
app:typography="body1" />
8278

83-
<FrameLayout
84-
android:id="@+id/addToFavoritesItem"
85-
android:layout_width="match_parent"
86-
android:layout_height="wrap_content"
87-
android:paddingTop="8dp"
88-
app:layout_constraintTop_toBottomOf="@id/addToFavoritesBottomDivider"
89-
android:visibility="gone">
79+
<androidx.constraintlayout.widget.Group
80+
android:id="@+id/savedSiteLocationContainer"
81+
android:layout_width="wrap_content"
82+
android:layout_height="wrap_content"
83+
android:visibility="gone"
84+
app:constraint_referenced_ids="savedSiteLocationLabel,savedSiteLocation" />
9085

91-
<com.duckduckgo.common.ui.view.listitem.OneLineListItem
92-
android:id="@+id/addToFavoritesPrimaryItem"
93-
android:layout_width="match_parent"
94-
android:layout_height="wrap_content"
95-
app:primaryText="@string/addToFavorites"
96-
app:leadingIconBackground="circular"/>
86+
<com.duckduckgo.common.ui.view.divider.HorizontalDivider
87+
android:id="@+id/addToFavoritesBottomDivider"
88+
android:layout_width="match_parent"
89+
android:layout_height="wrap_content"
90+
android:visibility="gone"
91+
app:layout_constraintTop_toBottomOf="@id/savedSiteLocation" />
92+
93+
<FrameLayout
94+
android:id="@+id/addToFavoritesItem"
95+
android:layout_width="match_parent"
96+
android:layout_height="wrap_content"
97+
android:paddingTop="8dp"
98+
android:visibility="gone"
99+
app:layout_constraintTop_toBottomOf="@id/addToFavoritesBottomDivider">
100+
101+
<com.duckduckgo.common.ui.view.listitem.OneLineListItem
102+
android:id="@+id/addToFavoritesPrimaryItem"
103+
android:layout_width="match_parent"
104+
android:layout_height="wrap_content"
105+
app:leadingIconBackground="circular"
106+
app:primaryText="@string/addToFavorites" />
97107

98-
<com.duckduckgo.common.ui.view.DaxSwitch
99-
android:id="@+id/addToFavoritesSwitch"
100-
android:layout_width="wrap_content"
101-
android:layout_height="wrap_content"
102-
android:layout_gravity="end|center_vertical"
103-
android:layout_marginEnd="16dp"/>
104-
</FrameLayout>
108+
<com.duckduckgo.common.ui.view.DaxSwitch
109+
android:id="@+id/addToFavoritesSwitch"
110+
android:layout_width="wrap_content"
111+
android:layout_height="wrap_content"
112+
android:layout_gravity="end|center_vertical"
113+
android:layout_marginEnd="16dp" />
114+
</FrameLayout>
115+
</androidx.constraintlayout.widget.ConstraintLayout>
116+
</ScrollView>
105117

106-
</androidx.constraintlayout.widget.ConstraintLayout>
118+
</LinearLayout>

0 commit comments

Comments
 (0)