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

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

Merge "Fix selection highlights."

parents 8278fbec 4e12b161
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