Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c21ebc5c authored by Tony Huang's avatar Tony Huang
Browse files

Update sorting UI and other UI

1. Use BottomSheetDialog to implement sort UI for new design.
2. Update test case for this sorting UI design.
3. Add divider on navigation bar to fit mock design.
4. Update light mode nav bar color that follow other apps has
   light mode.

Bug: 116460328
Test: atest DocumentsUITests
Change-Id: I0e704e773fe7587e11c9418c41c78c646b5704a3
parent 3bbfe612
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <solid android:color="?android:attr/colorPrimary" />

    <corners android:topLeftRadius="@dimen/grid_item_radius"
             android:topRightRadius="@dimen/grid_item_radius"
             android:bottomLeftRadius="0dp"
             android:bottomRightRadius="0dp"/>

</shape>
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:fillColor="@color/root_activated_color"
        android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
</vector>
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
        android:paddingTop="?android:attr/listPreferredItemPaddingStart"
        android:paddingBottom="?android:attr/listPreferredItemPaddingStart"
        android:textAllCaps="true"
        android:text="@string/sort_dimension_dialog_title"
        android:textAppearance="@style/SortTitle"/>

    <ListView
        android:id="@+id/sorting_dialog_list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

</LinearLayout>
+1 −9
Original line number Diff line number Diff line
@@ -32,16 +32,8 @@
        android:layout_height="@dimen/dropdown_sort_widget_size"
        android:paddingStart="12dp"
        android:gravity="center"
        android:textAllCaps="true"
        android:textAppearance="@style/SortTitle"
        style="?android:attr/borderlessButtonStyle"/>

    <ImageView
        android:id="@+id/sort_arrow"
        android:layout_width="@dimen/dropdown_sort_widget_size"
        android:layout_height="@dimen/dropdown_sort_widget_size"
        android:padding="16dp"
        android:src="@drawable/ic_sort_arrow"
        android:accessibilityTraversalAfter="@id/sort_dimen_dropdown"
        style="?android:attr/borderlessButtonStyle"/>

</LinearLayout>
+9 −0
Original line number Diff line number Diff line
@@ -43,4 +43,13 @@
        <item name="cardCornerRadius">@dimen/grid_item_radius</item>
        <item name="cardElevation">@dimen/grid_item_elevation</item>
    </style>

    <style name="BottomSheetDialogStyle" parent="@style/Theme.MaterialComponents.BottomSheetDialog">
        <item name="android:colorPrimary">@color/g_dark_grey</item>
        <item name="android:textColorPrimary">@color/g_light_grey</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
        <item name="android:windowIsFloating">false</item>
        <item name="bottomSheetStyle">@style/BottomSheet</item>
        <item name="colorControlHighlight">@color/root_focus_color</item>
    </style>
</resources>
Loading