|
20 | 20 | xmlns:tools="http://schemas.android.com/tools"
|
21 | 21 | android:layout_width="match_parent"
|
22 | 22 | android:layout_height="match_parent"
|
23 |
| - app:useDefaultLayout="false" |
24 |
| - tools:context=".ui.bottomSheetDialogs.AccountBottomSheetDialog"> |
| 23 | + tools:context=".ui.bottomSheetDialogs.AccountBottomSheetDialog" |
| 24 | + tools:title="My Account"> |
25 | 25 |
|
26 |
| - <LinearLayout |
27 |
| - android:layout_width="match_parent" |
28 |
| - android:layout_height="match_parent" |
29 |
| - android:orientation="vertical"> |
30 |
| - |
31 |
| - <androidx.recyclerview.widget.RecyclerView |
32 |
| - android:id="@+id/recyclerViewAccount" |
33 |
| - android:layout_width="match_parent" |
34 |
| - android:layout_height="wrap_content" |
35 |
| - android:clipToPadding="false" |
36 |
| - android:overScrollMode="never" |
37 |
| - android:paddingTop="@dimen/marginStandardMedium" |
38 |
| - app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
39 |
| - tools:itemCount="4" |
40 |
| - tools:listitem="@layout/item_switch_user_account" /> |
| 26 | + <!-- |
| 27 | + We use useDefaultLayout to true, which embed recyclerViewAccount into a NestedScrollView. This |
| 28 | + This prevent elements of the RecyclerView to be recycled. It should not be a big problem |
| 29 | + since we shouldn't have a lot of items here but this can be improved. |
| 30 | + --> |
41 | 31 |
|
42 |
| - <com.google.android.material.divider.MaterialDivider |
43 |
| - style="@style/ItemDivider" |
44 |
| - android:layout_marginVertical="@dimen/marginStandardSmall" /> |
| 32 | + <androidx.recyclerview.widget.RecyclerView |
| 33 | + android:id="@+id/recyclerViewAccount" |
| 34 | + android:layout_width="match_parent" |
| 35 | + android:layout_height="wrap_content" |
| 36 | + android:overScrollMode="never" |
| 37 | + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" |
| 38 | + tools:itemCount="4" |
| 39 | + tools:listitem="@layout/item_switch_user_account" /> |
45 | 40 |
|
46 |
| - <com.infomaniak.mail.ui.main.thread.actions.ActionItemView |
47 |
| - android:id="@+id/addAccount" |
48 |
| - android:layout_width="match_parent" |
49 |
| - android:layout_height="wrap_content" |
50 |
| - app:icon="@drawable/ic_add_thin" |
51 |
| - app:iconPaddingEnd="@dimen/marginStandardMedium" |
52 |
| - app:iconPaddingStart="@dimen/marginStandard" |
53 |
| - app:text="@string/buttonAddAccount" |
54 |
| - app:visibleDivider="false" /> |
| 41 | + <com.google.android.material.divider.MaterialDivider |
| 42 | + style="@style/ItemDivider" |
| 43 | + android:layout_marginVertical="@dimen/marginStandardSmall" /> |
55 | 44 |
|
56 |
| - <com.infomaniak.mail.ui.main.thread.actions.ActionItemView |
57 |
| - android:id="@+id/logout" |
58 |
| - android:layout_width="match_parent" |
59 |
| - android:layout_height="wrap_content" |
60 |
| - app:icon="@drawable/ic_logout" |
61 |
| - app:iconColor="@color/redDestructiveAction" |
62 |
| - app:iconPaddingEnd="@dimen/marginStandardMedium" |
63 |
| - app:iconPaddingStart="@dimen/marginStandard" |
64 |
| - app:text="@string/buttonAccountLogOut" |
65 |
| - app:textColor="@color/redDestructiveAction" |
66 |
| - app:visibleDivider="false" /> |
| 45 | + <com.infomaniak.mail.ui.main.thread.actions.ActionItemView |
| 46 | + android:id="@+id/addAccount" |
| 47 | + android:layout_width="match_parent" |
| 48 | + android:layout_height="wrap_content" |
| 49 | + app:icon="@drawable/ic_add_thin" |
| 50 | + app:iconPaddingEnd="@dimen/marginStandardMedium" |
| 51 | + app:iconPaddingStart="@dimen/marginStandard" |
| 52 | + app:text="@string/buttonAddAccount" |
| 53 | + app:visibleDivider="false" /> |
67 | 54 |
|
68 |
| - </LinearLayout> |
| 55 | + <com.infomaniak.mail.ui.main.thread.actions.ActionItemView |
| 56 | + android:id="@+id/logout" |
| 57 | + android:layout_width="match_parent" |
| 58 | + android:layout_height="wrap_content" |
| 59 | + app:icon="@drawable/ic_logout" |
| 60 | + app:iconColor="@color/redDestructiveAction" |
| 61 | + app:iconPaddingEnd="@dimen/marginStandardMedium" |
| 62 | + app:iconPaddingStart="@dimen/marginStandard" |
| 63 | + app:text="@string/buttonAccountLogOut" |
| 64 | + app:textColor="@color/redDestructiveAction" |
| 65 | + app:visibleDivider="false" /> |
69 | 66 |
|
70 | 67 | </com.infomaniak.mail.views.BottomSheetScaffoldingView>
|
0 commit comments