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

Commit d74a2258 authored by Raj Yengisetty's avatar Raj Yengisetty Committed by Steve Kondik
Browse files

Implement new action bar

ref: CLOUD-69

Change-Id: Ia105bb65d2358ad779066b84672d6d508ad81e63
parent fd77582d
Loading
Loading
Loading
Loading
+28 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (c) 2015 The CyanogenMod 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"
    android:viewportHeight="24">

    <path
        android:fillColor="#ffffff"
        android:pathData="M15.5,14h-0.8l-0.3-0.3c1-1.1,1.6-2.6,1.6-4.2C16,5.9,13.1,3,9.5,3S3,5.9,3,9.5S5.9,16,9.5,16
c1.6,0,3.1-0.6,4.2-1.6l0.3,0.3v0.8l5,5l1.5-1.5L15.5,14z
M9.5,14C7,14,5,12,5,9.5S7,5,9.5,5S14,7,14,9.5S12,14,9.5,14z" />
</vector>
+0 −4
Original line number Original line Diff line number Diff line
@@ -35,7 +35,6 @@
        android:id="@+id/scrimInsetsFrameLayoutNavigation"
        android:id="@+id/scrimInsetsFrameLayoutNavigation"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        app:insetForeground="@color/material_palette_blue_primary_dark">
        app:insetForeground="@color/material_palette_blue_primary_dark">


        <!-- The main content view -->
        <!-- The main content view -->
@@ -69,9 +68,6 @@
                android:background="@drawable/bg_material_selectionbar"
                android:background="@drawable/bg_material_selectionbar"
                android:visibility="invisible"/>
                android:visibility="invisible"/>


            <!-- StatusBar -->
            <include layout="@layout/navigation_view_statusbar"/>

        </LinearLayout>
        </LinearLayout>


    </com.cyanogenmod.filemanager.ui.widgets.ScrimInsetsFrameLayout>
    </com.cyanogenmod.filemanager.ui.widgets.ScrimInsetsFrameLayout>
+3 −1
Original line number Original line Diff line number Diff line
@@ -17,11 +17,13 @@


<android.support.v4.widget.DrawerLayout
<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawer_layout"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    android:layout_height="match_parent">


    <include layout="@layout/home_fragment"
        android:fitsSystemWindows="false" />

    <FrameLayout
    <FrameLayout
        android:id="@+id/navigation_fragment_container"
        android:id="@+id/navigation_fragment_container"
        android:layout_width="match_parent"
        android:layout_width="match_parent"

res/layout/navigation_drawer.xml

deleted100644 → 0
+0 −202
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<com.cyanogenmod.filemanager.ui.widgets.ScrimInsetsFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/scrimInsetsFrameLayout"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:fitsSystemWindows="true"
    android:elevation="@dimen/scrim_layout_elevation"
    app:insetForeground="#4000">

    <LinearLayout
        android:fitsSystemWindows="true"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:orientation="vertical">

        <RelativeLayout
            android:id="@+id/drawer"
            android:layout_width="280dp"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:background="@android:color/background_light">

            <RelativeLayout
                android:id="@+id/drawer_actionbar"
                android:layout_width="match_parent"
                android:layout_height="64dp"
                android:layout_alignParentBottom="true">

                <com.cyanogenmod.filemanager.ui.widgets.ButtonItem
                    android:id="@+id/ab_settings"
                    android:layout_width="@dimen/default_buttom_width"
                    android:layout_height="match_parent"
                    android:layout_alignParentEnd="true"
                    android:contentDescription="@string/menu_settings"
                    android:onClick="onActionBarItemClick"
                    android:src="@drawable/ic_material_light_settings"/>

                <com.cyanogenmod.filemanager.ui.widgets.ButtonItem
                    android:id="@+id/ab_clear_history"
                    android:layout_width="@dimen/default_buttom_width"
                    android:layout_height="match_parent"
                    android:layout_toEndOf="@id/ab_settings"
                    android:contentDescription="@string/menu_clear_history"
                    android:onClick="onActionBarItemClick"
                    android:src="@drawable/ic_material_light_delete"/>
            </RelativeLayout>

            <LinearLayout
                android:id="@+id/drawer_drawer_divider"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_above="@id/drawer_actionbar">

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

            </LinearLayout>

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_above="@id/drawer_drawer_divider"
                android:layout_alignParentTop="true">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                    <FrameLayout android:layout_height="@dimen/drawer_header_height"
                                 android:layout_width="match_parent">
                        <ImageView
                            android:id="@+id/header"
                            android:background="@drawable/fm_header_bg"
                            android:src="@drawable/header_gradient"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:scaleType="centerCrop"/>

                        <TextView
                            android:layout_gravity="bottom"
                            android:paddingStart="10dp"
                            android:paddingBottom="10dp"
                            android:layout_height="wrap_content"
                            android:layout_width="match_parent"
                            android:textColor="@android:color/white"
                            android:textSize="30sp"
                            android:text="@string/app_name"
                            android:clickable="true"/>

                    </FrameLayout>

                    <LinearLayout
                        android:id="@+id/filesystem_info_dialog_tabhost"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/default_row_height"
                        android:orientation="horizontal">

                        <TextView
                            android:id="@+id/drawer_bookmarks_tab"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/material_selector"
                            android:clickable="true"
                            android:gravity="center_horizontal|center_vertical"
                            android:text="@string/bookmarks"
                            android:textAllCaps="true"
                            android:textAppearance="@style/primary_text_appearance"/>

                        <include
                            android:id="@+id/drawer_tab_divider1"
                            layout="@layout/horizontal_divider"/>

                        <TextView
                            android:id="@+id/drawer_history_tab"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/material_selector"
                            android:clickable="true"
                            android:gravity="center_horizontal|center_vertical"
                            android:text="@string/history"
                            android:textAllCaps="true"
                            android:textAppearance="@style/primary_text_appearance"/>

                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content">

                        <include
                            android:id="@+id/drawer_tab_divider2"
                            layout="@layout/vertical_divider"/>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/drawer_bookmarks"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/default_margin"
                        android:layout_marginEnd="@dimen/default_margin"
                        android:orientation="vertical">

                        <ProgressBar
                            android:id="@+id/bookmarks_loading"
                            android:layout_width="@dimen/default_row_height"
                            android:layout_height="@dimen/default_row_height"
                            android:indeterminate="true"
                            android:indeterminateOnly="true"
                            android:visibility="gone"/>

                        <LinearLayout
                            android:id="@+id/bookmarks_list"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="@dimen/extra_margin"
                            android:orientation="vertical">

                        </LinearLayout>

                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/drawer_history"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/default_margin"
                        android:layout_marginEnd="@dimen/default_margin"
                        android:orientation="vertical"
                        android:visibility="gone">

                        <TextView
                            android:id="@+id/history_empty"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:text="@string/msgs_history_empty"
                            android:padding="@dimen/extra_margin"
                            android:gravity="center_horizontal"
                            android:textAppearance="@style/primary_text_appearance"/>

                        <LinearLayout
                            android:id="@+id/history_list"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginBottom="@dimen/extra_margin"
                            android:orientation="vertical">
                        </LinearLayout>

                    </LinearLayout>

                </LinearLayout>

            </ScrollView>
        </RelativeLayout>
    </LinearLayout>
</com.cyanogenmod.filemanager.ui.widgets.ScrimInsetsFrameLayout>
+10 −16
Original line number Original line Diff line number Diff line
@@ -20,26 +20,20 @@
    android:animateLayoutChanges="true"
    android:animateLayoutChanges="true"
    android:orientation="horizontal">
    android:orientation="horizontal">


    <com.cyanogenmod.filemanager.ui.widgets.NavigationCustomTitleView
        android:id="@+id/navigation_title_flipper"
        android:layout_width="0dp"
        android:layout_height="?android:attr/actionBarSize"
        android:layout_weight="1"
        android:animateFirstView="true">

        <!-- The breadcrumb layout (breadcrumb + configuration buttom) -->
        <include layout="@layout/navigation_view_customtitle_breadcrumb" />

        <!-- The configuration layout (sort, layout, other options, ...) -->
        <include layout="@layout/navigation_view_customtitle_configuration" />

    </com.cyanogenmod.filemanager.ui.widgets.NavigationCustomTitleView>

    <LinearLayout
    <LinearLayout
        android:id="@+id/navigation_title_landscape_holder"
        android:id="@+id/navigation_title_landscape_holder"
        android:layout_width="wrap_content"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"/>
        android:orientation="horizontal">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:id="@+id/drawer_title"
            android:textSize="20sp"
            android:textColor="@color/action_bar_title_text_color"/>

    </LinearLayout>


    <SearchView
    <SearchView
        android:id="@+id/navigation_search_bar"
        android:id="@+id/navigation_search_bar"
Loading