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

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

Merge "Fix selection highlights."

parents 3b9cac0d 8903eb0d
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -316,12 +316,8 @@ public class DirectoryFragment extends Fragment {
        mAdapter = new DocumentsAdapter(context);
        mRecView.setAdapter(mAdapter);

        mDefaultItemColor = context.getResources().getColor(android.R.color.transparent);
        // Get the accent color.
        TypedValue selColor = new TypedValue();
        context.getTheme().resolveAttribute(android.R.attr.colorAccent, selColor, true);
        // Set the opacity to 10%.
        mSelectedItemColor = (selColor.data & 0x00ffffff) | 0x16000000;
        mDefaultItemColor = context.getResources().getColor(R.color.item_doc_background);
        mSelectedItemColor = context.getResources().getColor(R.color.item_doc_background_selected);

        GestureDetector.SimpleOnGestureListener listener =
                new GestureDetector.SimpleOnGestureListener() {
@@ -943,6 +939,7 @@ public class DirectoryFragment extends Fragment {

        public void setSelected(boolean selected) {
            itemView.setActivated(selected);
            itemView.setBackgroundColor(selected ? mSelectedItemColor : mDefaultItemColor);
        }

        @Override