Loading res/color/item_doc_grid_tint.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 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. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:color="?android:attr/colorAccent" android:alpha=".5" /> <item android:color="@android:color/transparent" /> </selector> res/layout/item_doc_grid.xml +3 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:scaleType="centerCrop" android:contentDescription="@null" /> android:contentDescription="@null" android:tint="@color/item_doc_grid_tint" android:tintMode="src_over" /> <com.android.documentsui.GridItemThumbnail android:id="@+id/icon_mime_lg" Loading res/values/config.xml +0 −1 Original line number Diff line number Diff line Loading @@ -27,5 +27,4 @@ <!-- Indicates if search view is taking the whole toolbar space --> <bool name="full_bar_search_view">true</bool> </resources> src/com/android/documentsui/Shared.java +5 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,11 @@ public final class Shared { */ public static final int MAX_DOCS_IN_INTENT = 500; /** * Animation duration of checkbox in directory list/grid in millis. */ public static final int CHECK_ANIMATION_DURATION = 100; private static final Collator sCollator; static { Loading src/com/android/documentsui/dirlist/DocumentHolder.java +7 −1 Original line number Diff line number Diff line Loading @@ -26,9 +26,12 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewPropertyAnimator; import android.widget.ImageView; import com.android.documentsui.Events.InputEvent; import com.android.documentsui.R; import com.android.documentsui.Shared; import com.android.documentsui.State; public abstract class DocumentHolder Loading @@ -48,7 +51,6 @@ public abstract class DocumentHolder private View mSelectionHotspot; public DocumentHolder(Context context, ViewGroup parent, int layout) { this(context, inflateLayout(context, parent, layout)); } Loading Loading @@ -159,6 +161,10 @@ public abstract class DocumentHolder return inflater.inflate(layout, parent, false); } static ViewPropertyAnimator fade(ImageView view, float alpha) { return view.animate().setDuration(Shared.CHECK_ANIMATION_DURATION).alpha(alpha); } /** * Implement this in order to be able to respond to events coming from DocumentHolders. * TODO: Make this bubble up logic events rather than having imperative commands. Loading Loading
res/color/item_doc_grid_tint.xml 0 → 100644 +24 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 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. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:color="?android:attr/colorAccent" android:alpha=".5" /> <item android:color="@android:color/transparent" /> </selector>
res/layout/item_doc_grid.xml +3 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:scaleType="centerCrop" android:contentDescription="@null" /> android:contentDescription="@null" android:tint="@color/item_doc_grid_tint" android:tintMode="src_over" /> <com.android.documentsui.GridItemThumbnail android:id="@+id/icon_mime_lg" Loading
res/values/config.xml +0 −1 Original line number Diff line number Diff line Loading @@ -27,5 +27,4 @@ <!-- Indicates if search view is taking the whole toolbar space --> <bool name="full_bar_search_view">true</bool> </resources>
src/com/android/documentsui/Shared.java +5 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,11 @@ public final class Shared { */ public static final int MAX_DOCS_IN_INTENT = 500; /** * Animation duration of checkbox in directory list/grid in millis. */ public static final int CHECK_ANIMATION_DURATION = 100; private static final Collator sCollator; static { Loading
src/com/android/documentsui/dirlist/DocumentHolder.java +7 −1 Original line number Diff line number Diff line Loading @@ -26,9 +26,12 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewPropertyAnimator; import android.widget.ImageView; import com.android.documentsui.Events.InputEvent; import com.android.documentsui.R; import com.android.documentsui.Shared; import com.android.documentsui.State; public abstract class DocumentHolder Loading @@ -48,7 +51,6 @@ public abstract class DocumentHolder private View mSelectionHotspot; public DocumentHolder(Context context, ViewGroup parent, int layout) { this(context, inflateLayout(context, parent, layout)); } Loading Loading @@ -159,6 +161,10 @@ public abstract class DocumentHolder return inflater.inflate(layout, parent, false); } static ViewPropertyAnimator fade(ImageView view, float alpha) { return view.animate().setDuration(Shared.CHECK_ANIMATION_DURATION).alpha(alpha); } /** * Implement this in order to be able to respond to events coming from DocumentHolders. * TODO: Make this bubble up logic events rather than having imperative commands. Loading