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

Commit 4b3a13c1 authored by Steve McKay's avatar Steve McKay
Browse files

Update DirectoryFragment to use RecyclerView.

Add MultiSelectMaanger class to manager selection on a RecyclerView instance.
There are several outstanding issues that still need to be addressed
surrounding Grid mode as the GridLayout manager doesn't support
automatic column count calculation.
Also, we're missing the puddle effect on touch...
And probably other stuff. But it all *mostly* works.
Oh, also. Footers are currently commented out.
Add traditional unit tests for MultiSelectManager.

BUG: 22225617
Change-Id: I3cd26a10683f42053556d463a5d2f0d2a0bbde84
parent 4dc07b4d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -185,6 +185,11 @@ public class SparseBooleanArray implements Cloneable {
        mValues[index] = value;
    }

    /** @hide */
    public void setKeyAt(int index, int key) {
        mKeys[index] = key;
    }

    /**
     * Returns the index for which {@link #keyAt} would return the
     * specified key, or a negative number if the specified
+3 −1
Original line number Diff line number Diff line
@@ -5,7 +5,9 @@ LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 guava
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 \
    android-support-v7-recyclerview \
    guava

LOCAL_PACKAGE_NAME := DocumentsUI
LOCAL_CERTIFICATE := platform
+5 −6
Original line number Diff line number Diff line
@@ -28,24 +28,23 @@
        android:visibility="gone"
        style="@android:style/TextAppearance.Material.Subhead" />

    <!-- The 'list' view is still used for RecentsCreateFragment -->
    <ListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <GridView
        android:id="@+id/grid"
    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerView"
        android:scrollbars="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingStart="@dimen/grid_padding_horiz"
        android:paddingEnd="@dimen/grid_padding_horiz"
        android:paddingTop="@dimen/grid_padding_vert"
        android:paddingBottom="@dimen/grid_padding_vert"
        android:horizontalSpacing="@dimen/grid_item_padding"
        android:verticalSpacing="@dimen/grid_item_padding"
        android:clipToPadding="false"
        android:scrollbarStyle="outsideOverlay"
        android:drawSelectorOnTop="true"
        android:visibility="gone" />
        android:drawSelectorOnTop="true" />

</com.android.documentsui.DirectoryView>
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/grid_item_height"
    android:background="@color/item_doc_grid_background">
    android:background="@color/item_doc_grid_background"
    android:padding="@dimen/grid_item_padding">

    <ImageView
        android:id="@+id/icon_thumb"
+358 −304

File changed.

Preview size limit exceeded, changes collapsed.

Loading