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

Commit 7cbde88b authored by Tony Huang's avatar Tony Huang
Browse files

Implement new search bar style for new landing page design

The visual is customize theme on toolbar to make it looks like search
view. Only landing page showing as search view style, others
(Image, Video, Download...) showing as legacy toolbar.

Bug: 111914879
Bug: 116186158
Test: atest DocumentsUITests
Change-Id: I025852cf23913435241ca0a8df602f77176862cb
parent 476136af
Loading
Loading
Loading
Loading
+30 −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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="@android:color/transparent"/>
        </shape>
    </item>
    <item
        android:start="@dimen/search_bar_background_margin_start"
        android:end="@dimen/search_bar_background_margin_end">
        <shape android:shape="rectangle">
            <solid android:color="?colorBackgroundFloating"/>
            <corners android:radius="@dimen/search_bar_radius"/>
        </shape>
    </item>
</layer-list>
 No newline at end of file
+15 −0
Original line number Diff line number Diff line
@@ -26,11 +26,26 @@
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?android:attr/actionBarSize"
        android:layout_margin="@dimen/search_bar_margin"
        android:background="?android:attr/colorBackground"
        android:theme="?actionBarTheme"
        android:popupTheme="?actionBarPopupTheme"
        android:elevation="3dp"
        app:layout_collapseMode="pin">

        <TextView
            android:id="@+id/searchbar_title"
            android:layout_width="match_parent"
            android:layout_height="?android:attr/actionBarSize"
            android:layout_marginStart="@dimen/search_bar_text_margin_start"
            android:layout_marginEnd="@dimen/search_bar_text_margin_end"
            android:paddingStart="@dimen/search_bar_icon_padding"
            android:gravity="center_vertical"
            android:text="@string/search_bar_hint"
            android:textAppearance="@style/SearchBarTitle"
            android:drawableStart="@drawable/ic_menu_search"
            android:drawablePadding="@dimen/search_bar_icon_padding"/>

        <com.android.documentsui.DropdownBreadcrumb
            android:id="@+id/dropdown_breadcrumb"
            android:layout_width="wrap_content"
+1 −1
Original line number Diff line number Diff line
@@ -16,4 +16,4 @@
<android.widget.Space
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="?android:attr/actionBarSize"/>
 No newline at end of file
    android:layout_height="@dimen/action_bar_space_height"/>
 No newline at end of file
+18 −2
Original line number Diff line number Diff line
@@ -26,22 +26,38 @@
        android:id="@+id/collapsing_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?android:attr/colorBackground"
        android:elevation="3dp"
        app:titleEnabled="false"
        app:layout_scrollFlags="scroll|exitUntilCollapsed">
        app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">

        <include layout="@layout/directory_header"/>

        <View
            android:id="@+id/toolbar_background_layout"
            android:layout_width="match_parent"
            android:layout_height="@dimen/action_bar_space_height"
            android:background="?android:attr/colorBackground"
            app:layout_collapseMode="pin"/>

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?android:attr/actionBarSize"
            android:layout_margin="@dimen/search_bar_margin"
            android:background="?android:attr/colorBackground"
            android:theme="?actionBarTheme"
            android:popupTheme="?actionBarPopupTheme"
            android:elevation="3dp"
            app:layout_collapseMode="pin">

            <TextView
                android:id="@+id/searchbar_title"
                android:layout_width="match_parent"
                android:layout_height="?android:attr/actionBarSize"
                android:gravity="center_vertical"
                android:text="@string/search_bar_hint"
                android:textAppearance="@style/SearchBarTitle"/>

            <com.android.documentsui.DropdownBreadcrumb
                android:id="@+id/dropdown_breadcrumb"
                android:layout_width="wrap_content"
+3 −3
Original line number Diff line number Diff line
@@ -33,12 +33,10 @@
            android:layout_height="match_parent"
            android:orientation="vertical">

            <include layout="@layout/directory_app_bar"/>

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layout_behavior="@string/appbar_scrolling_view_behavior">
                app:layout_behavior="@string/scrolling_behavior">

                <LinearLayout
                    android:layout_width="match_parent"
@@ -71,6 +69,8 @@
                android:background="?android:attr/colorBackground"
                android:elevation="8dp" />

            <include layout="@layout/directory_app_bar"/>

        </androidx.coordinatorlayout.widget.CoordinatorLayout>

        <LinearLayout
Loading