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

Commit 631509a6 authored by Ben Kwa's avatar Ben Kwa Committed by Android (Google) Code Review
Browse files

Merge "Replace error/info footers with a message bar."

parents a61214d9 3b19e31e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -18,6 +18,13 @@
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/container_message_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:elevation="8dp"
        android:background="@color/material_grey_50"/>

    <com.android.documentsui.DirectoryContainerView
        android:id="@+id/container_directory"
        android:layout_width="match_parent"
+35 −11
Original line number Diff line number Diff line
@@ -34,6 +34,26 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:animateLayoutChanges="true">

        <FrameLayout
            android:id="@+id/container_message_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:elevation="8dp"
            android:background="@color/material_grey_50"
            android:visibility="gone"/>
      
        <!-- This FrameLayout works around b/24189541 -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">
          
            <android.support.v7.widget.RecyclerView
                android:id="@+id/recyclerView"
                android:scrollbars="vertical"
@@ -48,4 +68,8 @@
                android:drawSelectorOnTop="true"
                android:background="@color/directory_background" />
            
        </FrameLayout>
        
    </LinearLayout>

</com.android.documentsui.DirectoryView>
+100 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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:animateLayoutChanges="true"
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:minHeight="?android:attr/listPreferredItemHeightSmall"
    android:orientation="vertical"
    android:paddingLeft="@dimen/list_item_padding"
    android:paddingRight="@dimen/list_item_padding"
    android:paddingTop="@dimen/list_item_padding">

    <LinearLayout
        android:id="@+id/container_info"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal"
        android:visibility="gone">

        <FrameLayout
            android:layout_height="@dimen/icon_size"
            android:layout_width="@dimen/icon_size">

            <ImageView
                android:contentDescription="@null"
                android:id="@+id/icon_info"
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:scaleType="centerInside"/>

        </FrameLayout>

        <TextView
            android:id="@+id/textview_info"
            android:layout_gravity="center_vertical"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:selectAllOnFocus="true"/>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/container_error"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal"
        android:visibility="gone">

        <FrameLayout
            android:layout_height="@dimen/icon_size"
            android:layout_width="@dimen/icon_size">

            <ImageView
                android:contentDescription="@null"
                android:id="@+id/icon_error"
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:scaleType="centerInside"/>

        </FrameLayout>

        <TextView
            android:id="@+id/textview_error"
            android:layout_gravity="center_vertical"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:selectAllOnFocus="true"/>

    </LinearLayout>

    <LinearLayout
        android:layout_gravity="right"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:orientation="horizontal">

        <Button
            android:id="@+id/button_dismiss"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="@string/button_dismiss"
            style="?android:attr/buttonBarPositiveButtonStyle"/>

    </LinearLayout>

</LinearLayout>
+0 −29
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 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.
-->

<com.android.documentsui.GridItem xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/grid_height"
    android:orientation="horizontal">

    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true"
        style="?android:attr/progressBarStyle" />

</com.android.documentsui.GridItem>
+0 −29
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 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.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="@dimen/list_item_height">

    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminate="true"
        style="?android:attr/progressBarStyle" />

</FrameLayout>
Loading