Remove DirectoryContainerView class from DocumentsUI.
Removed and it works as before, I guess it was some workaround for a bug in the past. Change-Id: I859c995940ad04ac028aea1727a81358ca7fda1b
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
android:elevation="8dp"
|
||||
android:background="@color/material_grey_50"/>
|
||||
|
||||
<com.android.documentsui.DirectoryContainerView
|
||||
<FrameLayout
|
||||
android:id="@+id/container_directory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
|
||||
@@ -80,7 +80,6 @@ public abstract class BaseActivity extends Activity
|
||||
private final String mTag;
|
||||
@LayoutRes
|
||||
private int mLayoutId;
|
||||
private DirectoryContainerView mDirectoryContainer;
|
||||
|
||||
public abstract void onDocumentPicked(DocumentInfo doc, @Nullable SiblingProvider siblings);
|
||||
public abstract void onDocumentsPicked(List<DocumentInfo> docs);
|
||||
@@ -118,7 +117,6 @@ public abstract class BaseActivity extends Activity
|
||||
}
|
||||
});
|
||||
|
||||
mDirectoryContainer = (DirectoryContainerView) findViewById(R.id.container_directory);
|
||||
mSearchManager = new SearchManager(this);
|
||||
|
||||
DocumentsToolbar toolbar = (DocumentsToolbar) findViewById(R.id.toolbar);
|
||||
@@ -351,7 +349,6 @@ public abstract class BaseActivity extends Activity
|
||||
public final void refreshCurrentRootAndDirectory(int anim) {
|
||||
mSearchManager.cancelSearch();
|
||||
|
||||
mDirectoryContainer.setDrawDisappearingFirst(anim == ANIM_ENTER);
|
||||
refreshDirectory(anim);
|
||||
|
||||
final RootsFragment roots = RootsFragment.get(getFragmentManager());
|
||||
@@ -370,7 +367,6 @@ public abstract class BaseActivity extends Activity
|
||||
*/
|
||||
@Override
|
||||
public void onSearchChanged() {
|
||||
mDirectoryContainer.setDrawDisappearingFirst(false);
|
||||
refreshDirectory(ANIM_NONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.android.documentsui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DirectoryContainerView extends FrameLayout {
|
||||
private boolean mDisappearingFirst = false;
|
||||
|
||||
public DirectoryContainerView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public DirectoryContainerView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
final ArrayList<View> disappearing = mDisappearingChildren;
|
||||
if (mDisappearingFirst && disappearing != null) {
|
||||
for (int i = 0; i < disappearing.size(); i++) {
|
||||
super.drawChild(canvas, disappearing.get(i), getDrawingTime());
|
||||
}
|
||||
}
|
||||
super.dispatchDraw(canvas);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
|
||||
if (mDisappearingFirst && mDisappearingChildren != null
|
||||
&& mDisappearingChildren.contains(child)) {
|
||||
return false;
|
||||
}
|
||||
return super.drawChild(canvas, child, drawingTime);
|
||||
}
|
||||
|
||||
public void setDrawDisappearingFirst(boolean disappearingFirst) {
|
||||
mDisappearingFirst = disappearingFirst;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user