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

Commit 641d53a7 authored by Ben Kwa's avatar Ben Kwa
Browse files

DocumentsUI: Enable focus on directory contents.

- Enable the focus bit on grid and list items.
- Add (ugly placeholder) styles so we can see the focused item.

BUG=24677520

Change-Id: I29fc09cd24c67d50f93937030606dbfc64962932
parent f98feb05
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -15,6 +15,10 @@
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_focused="true"
        android:color="@color/platform_blue_a200"
        android:alpha="0.1" />
    <item
        android:state_activated="true"
        android:color="?android:attr/colorAccent"
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,10 @@
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:state_focused="true"
        android:color="@color/platform_blue_a200"
        android:alpha="0.1" />
    <item
        android:state_activated="true"
        android:color="?android:attr/colorAccent"
+4 −0
Original line number Diff line number Diff line
@@ -879,6 +879,10 @@ public class DirectoryFragment extends Fragment {
        public DocumentHolder(View view) {
            super(view);
            this.view = view;
            // Setting this using android:focusable in the item layouts doesn't work for list items.
            // So we set it here.  Note that touch mode focus is a separate issue - see
            // View.setFocusableInTouchMode and View.isInTouchMode for more info.
            this.view.setFocusable(true);
        }
    }