Skip to content

Commit 950149d

Browse files
liveHarshitiamareebjamal
authored andcommitted
fix: Make search filter fragment scrollable (#1840)
1 parent 0c51baa commit 950149d

File tree

1 file changed

+148
-142
lines changed

1 file changed

+148
-142
lines changed
Lines changed: 148 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,174 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:id="@+id/rootView"
7-
android:padding="@dimen/padding_medium"
8-
android:orientation="vertical"
96
tools:context="org.fossasia.openevent.general.search.SearchFilterFragment">
107

118
<LinearLayout
12-
android:layout_marginBottom="@dimen/layout_margin_medium"
13-
android:orientation="vertical"
9+
android:id="@+id/rootView"
1410
android:layout_width="match_parent"
15-
android:layout_height="wrap_content">
16-
17-
<TextView
18-
android:id="@+id/dateLabel"
19-
android:padding="@dimen/padding_medium"
20-
android:textColor="@color/black"
21-
android:textSize="@dimen/text_size_expanded_title"
22-
android:text="@string/date"
23-
android:layout_width="match_parent"
24-
android:layout_height="wrap_content" />
25-
26-
<TextView
27-
android:layout_marginStart="@dimen/layout_margin_large"
28-
android:background="?selectableItemBackground"
29-
android:drawableStart="@drawable/ic_time"
30-
android:padding="@dimen/padding_small"
31-
android:gravity="center_vertical"
32-
android:drawablePadding="@dimen/padding_medium"
33-
android:textSize="@dimen/text_size_larger"
34-
android:text="@string/anytime"
35-
android:id="@+id/tvSelectDate"
36-
android:layout_width="wrap_content"
37-
android:layout_height="wrap_content" />
38-
</LinearLayout>
39-
40-
<LinearLayout
11+
android:layout_height="match_parent"
4112
android:orientation="vertical"
42-
android:layout_width="match_parent"
43-
android:layout_height="wrap_content"
44-
android:layout_marginBottom="@dimen/layout_margin_medium">
45-
46-
<TextView
47-
android:id="@+id/locationLabel"
48-
android:padding="@dimen/padding_medium"
49-
android:textColor="@color/black"
50-
android:textSize="@dimen/text_size_expanded_title"
51-
android:text="@string/location"
52-
android:layout_width="match_parent"
53-
android:layout_height="wrap_content" />
54-
55-
<TextView
56-
android:layout_marginStart="@dimen/layout_margin_large"
57-
android:background="?selectableItemBackground"
58-
android:drawableTint="@color/light_grey"
59-
android:drawableStart="@drawable/ic_location_pin"
60-
android:padding="@dimen/padding_small"
61-
android:gravity="center_vertical"
62-
android:drawablePadding="@dimen/padding_medium"
63-
android:textSize="@dimen/text_size_larger"
64-
android:text="@string/anywhere"
65-
android:id="@+id/tvSelectLocation"
66-
android:layout_width="wrap_content"
67-
android:layout_height="wrap_content" />
68-
</LinearLayout>
13+
android:padding="@dimen/padding_medium">
6914

70-
<LinearLayout
71-
android:orientation="vertical"
72-
android:layout_width="match_parent"
73-
android:layout_height="wrap_content"
74-
android:layout_marginBottom="@dimen/layout_margin_medium">
75-
76-
<TextView
77-
android:id="@+id/categoryLabel"
78-
android:padding="@dimen/padding_medium"
79-
android:textColor="@color/black"
80-
android:textSize="@dimen/text_size_expanded_title"
81-
android:text="@string/category"
15+
<LinearLayout
8216
android:layout_width="match_parent"
83-
android:layout_height="wrap_content" />
84-
85-
<TextView
86-
android:layout_marginStart="@dimen/layout_margin_large"
87-
android:background="?selectableItemBackground"
88-
android:drawableTint="@color/light_grey"
89-
android:drawableStart="@drawable/ic_star_border"
90-
android:padding="@dimen/padding_small"
91-
android:gravity="center_vertical"
92-
android:drawablePadding="@dimen/padding_medium"
93-
android:textSize="@dimen/text_size_larger"
94-
android:text="@string/anything"
95-
android:id="@+id/tvSelectCategory"
96-
android:layout_width="wrap_content"
97-
android:layout_height="wrap_content" />
98-
</LinearLayout>
17+
android:layout_height="wrap_content"
18+
android:layout_marginBottom="@dimen/layout_margin_medium"
19+
android:orientation="vertical">
9920

100-
<LinearLayout
101-
android:orientation="vertical"
102-
android:layout_width="match_parent"
103-
android:layout_height="wrap_content">
104-
105-
<TextView
106-
android:id="@+id/PriceLabel"
107-
android:padding="@dimen/padding_medium"
108-
android:textColor="@color/black"
109-
android:textSize="@dimen/text_size_expanded_title"
110-
android:text="@string/price"
111-
android:layout_width="match_parent"
112-
android:layout_height="wrap_content" />
113-
114-
<CheckBox
115-
android:layout_marginEnd="@dimen/layout_margin_large"
116-
android:padding="@dimen/padding_medium"
117-
android:textSize="@dimen/text_size_large"
118-
android:textColor="@color/light_grey"
119-
android:text="@string/free_stuff"
120-
android:id="@+id/freeStuffCheckBox"
121-
android:layoutDirection="rtl"
122-
android:layout_width="match_parent"
123-
android:layout_height="wrap_content" />
124-
</LinearLayout>
21+
<TextView
22+
android:id="@+id/dateLabel"
23+
android:layout_width="match_parent"
24+
android:layout_height="wrap_content"
25+
android:padding="@dimen/padding_medium"
26+
android:text="@string/date"
27+
android:textColor="@color/black"
28+
android:textSize="@dimen/text_size_expanded_title" />
12529

126-
<LinearLayout
127-
android:orientation="vertical"
128-
android:layout_width="match_parent"
129-
android:layout_height="wrap_content">
130-
131-
<TextView
132-
android:id="@+id/sortLabel"
133-
android:padding="@dimen/padding_medium"
134-
android:textColor="@color/black"
135-
android:textSize="@dimen/text_size_expanded_title"
136-
android:text="@string/sort_by"
30+
<TextView
31+
android:id="@+id/tvSelectDate"
32+
android:layout_width="wrap_content"
33+
android:layout_height="wrap_content"
34+
android:layout_marginStart="@dimen/layout_margin_large"
35+
android:background="?selectableItemBackground"
36+
android:drawableStart="@drawable/ic_time"
37+
android:drawablePadding="@dimen/padding_medium"
38+
android:gravity="center_vertical"
39+
android:padding="@dimen/padding_small"
40+
android:text="@string/anytime"
41+
android:textSize="@dimen/text_size_larger" />
42+
</LinearLayout>
43+
44+
<LinearLayout
13745
android:layout_width="match_parent"
138-
android:layout_height="wrap_content" />
46+
android:layout_height="wrap_content"
47+
android:layout_marginBottom="@dimen/layout_margin_medium"
48+
android:orientation="vertical">
13949

140-
<RadioGroup
141-
android:layout_width="fill_parent"
50+
<TextView
51+
android:id="@+id/locationLabel"
52+
android:layout_width="match_parent"
53+
android:layout_height="wrap_content"
54+
android:padding="@dimen/padding_medium"
55+
android:text="@string/location"
56+
android:textColor="@color/black"
57+
android:textSize="@dimen/text_size_expanded_title" />
58+
59+
<TextView
60+
android:id="@+id/tvSelectLocation"
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
63+
android:layout_marginStart="@dimen/layout_margin_large"
64+
android:background="?selectableItemBackground"
65+
android:drawableStart="@drawable/ic_location_pin"
66+
android:drawablePadding="@dimen/padding_medium"
67+
android:drawableTint="@color/light_grey"
68+
android:gravity="center_vertical"
69+
android:padding="@dimen/padding_small"
70+
android:text="@string/anywhere"
71+
android:textSize="@dimen/text_size_larger" />
72+
</LinearLayout>
73+
74+
<LinearLayout
75+
android:layout_width="match_parent"
14276
android:layout_height="wrap_content"
143-
android:id="@+id/radioGroup">
77+
android:layout_marginBottom="@dimen/layout_margin_medium"
78+
android:orientation="vertical">
14479

145-
<RadioButton
80+
<TextView
81+
android:id="@+id/categoryLabel"
14682
android:layout_width="match_parent"
14783
android:layout_height="wrap_content"
148-
android:text="@string/date"
149-
android:layoutDirection="rtl"
84+
android:padding="@dimen/padding_medium"
85+
android:text="@string/category"
86+
android:textColor="@color/black"
87+
android:textSize="@dimen/text_size_expanded_title" />
88+
89+
<TextView
90+
android:id="@+id/tvSelectCategory"
91+
android:layout_width="wrap_content"
92+
android:layout_height="wrap_content"
93+
android:layout_marginStart="@dimen/layout_margin_large"
94+
android:background="?selectableItemBackground"
95+
android:drawableStart="@drawable/ic_star_border"
96+
android:drawablePadding="@dimen/padding_medium"
97+
android:drawableTint="@color/light_grey"
98+
android:gravity="center_vertical"
15099
android:padding="@dimen/padding_small"
151-
android:textSize="@dimen/text_size_large"
152-
android:id="@+id/dateRadioButton"
153-
android:checked="false" />
100+
android:text="@string/anything"
101+
android:textSize="@dimen/text_size_larger" />
102+
</LinearLayout>
154103

155-
<RadioButton
104+
<LinearLayout
105+
android:layout_width="match_parent"
106+
android:layout_height="wrap_content"
107+
android:orientation="vertical">
108+
109+
<TextView
110+
android:id="@+id/PriceLabel"
111+
android:layout_width="match_parent"
112+
android:layout_height="wrap_content"
113+
android:padding="@dimen/padding_medium"
114+
android:text="@string/price"
115+
android:textColor="@color/black"
116+
android:textSize="@dimen/text_size_expanded_title" />
117+
118+
<CheckBox
119+
android:id="@+id/freeStuffCheckBox"
156120
android:layout_width="match_parent"
157121
android:layout_height="wrap_content"
158-
android:text="@string/name"
122+
android:layout_marginEnd="@dimen/layout_margin_large"
159123
android:layoutDirection="rtl"
160-
android:padding="@dimen/padding_small"
161-
android:textSize="@dimen/text_size_large"
162-
android:id="@+id/nameRadioButton"
163-
android:layout_gravity="center_horizontal"
164-
android:checked="false" />
165-
</RadioGroup>
124+
android:padding="@dimen/padding_medium"
125+
android:text="@string/free_stuff"
126+
android:textColor="@color/light_grey"
127+
android:textSize="@dimen/text_size_large" />
128+
</LinearLayout>
166129

130+
<LinearLayout
131+
android:layout_width="match_parent"
132+
android:layout_height="wrap_content"
133+
android:orientation="vertical">
134+
135+
<TextView
136+
android:id="@+id/sortLabel"
137+
android:layout_width="match_parent"
138+
android:layout_height="wrap_content"
139+
android:padding="@dimen/padding_medium"
140+
android:text="@string/sort_by"
141+
android:textColor="@color/black"
142+
android:textSize="@dimen/text_size_expanded_title" />
143+
144+
<RadioGroup
145+
android:id="@+id/radioGroup"
146+
android:layout_width="fill_parent"
147+
android:layout_height="wrap_content">
148+
149+
<RadioButton
150+
android:id="@+id/dateRadioButton"
151+
android:layout_width="match_parent"
152+
android:layout_height="wrap_content"
153+
android:checked="false"
154+
android:layoutDirection="rtl"
155+
android:padding="@dimen/padding_small"
156+
android:text="@string/date"
157+
android:textSize="@dimen/text_size_large" />
158+
159+
<RadioButton
160+
android:id="@+id/nameRadioButton"
161+
android:layout_width="match_parent"
162+
android:layout_height="wrap_content"
163+
android:layout_gravity="center_horizontal"
164+
android:checked="false"
165+
android:layoutDirection="rtl"
166+
android:padding="@dimen/padding_small"
167+
android:text="@string/name"
168+
android:textSize="@dimen/text_size_large" />
169+
</RadioGroup>
170+
171+
</LinearLayout>
167172
</LinearLayout>
168-
</LinearLayout>
173+
</androidx.core.widget.NestedScrollView>
174+

0 commit comments

Comments
 (0)