OSDN Git Service

Cleanup sliding animation between directories.
authorTomasz Mikolajewski <mtomasz@google.com>
Mon, 8 Feb 2016 09:08:18 +0000 (18:08 +0900)
committerTomasz Mikolajewski <mtomasz@google.com>
Tue, 9 Feb 2016 09:20:53 +0000 (09:20 +0000)
The shadow is restored + redundant fade removed.

Bug: 26986946
Change-Id: I31dde7d03f60be470e1c5e06dcdce828d3e4eaa0
(cherry picked from commit 3134ddf99d4215041ed749f3b4e682a1910d208e)

packages/DocumentsUI/res/layout/directory_cluster.xml
packages/DocumentsUI/res/layout/fragment_directory.xml
packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java

index 2fa09d3..d84ef08 100644 (file)
@@ -27,6 +27,7 @@
 
     <FrameLayout
         android:id="@+id/container_directory"
+        android:clipToPadding="false"
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_weight="1" />
index e97ced2..d0364ff 100644 (file)
@@ -17,6 +17,9 @@
 <com.android.documentsui.DirectoryView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/window_background"
+    android:outlineProvider="bounds"
+    android:elevation="4dp"
     android:orientation="vertical">
 
     <ProgressBar
@@ -81,7 +84,6 @@
 
         <android.support.v7.widget.RecyclerView
             android:id="@+id/list"
-            android:background="@color/window_background"
             android:scrollbars="vertical"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
index 70bee3c..d21b157 100644 (file)
@@ -876,17 +876,8 @@ public class DirectoryFragment extends Fragment implements DocumentsAdapter.Envi
         msgView.setText(msg);
         imageView.setImageResource(drawable);
 
-        content.animate().cancel();  // cancel any ongoing animations
-
-        content.setAlpha(0);
         mEmptyView.setVisibility(View.VISIBLE);
         mRecView.setVisibility(View.GONE);
-
-        // fade in the content, so it looks purdy like
-        content.animate()
-                .alpha(1f)
-                .setDuration(EMPTY_REVEAL_DURATION)
-                .setListener(null);
     }
 
     private void showDirectory() {