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

Commit d6a85b92 authored by Ben Lin's avatar Ben Lin
Browse files

Allow all roots to have OnItemDragListener.

Also changed root highlight/hover and focus color to concrete hex color.

Bug: 31182423
Change-Id: I9f2c53396d18a58d5d140b3430a07cabbeb32b67
parent 3808de5d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
        <selector>
            <item
                app:state_highlighted="true"
                android:drawable="@color/item_doc_background_selected"/>
                android:drawable="@color/root_hover_color"/>
            <item
                app:state_highlighted="false"
                android:drawable="@android:color/transparent"/>
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
  <item
    android:state_focused="true"
    android:state_pressed="false">
      <color android:color="?attr/colorControlHighlight" />
      <color android:color="@color/root_focus_color" />
  </item>

</selector>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@
    <color name="root_title_color">#de000000</color>
    <color name="root_activated_color">@*android:color/Blue_700</color>
    <color name="root_details_color">#8a000000</color>
    <color name="root_focus_color">#ffe0e0e0</color>
    <color name="root_hover_color">#ffe0e0e0</color>

    <color name="sort_widget_text_color">#de000000</color>

+4 −0
Original line number Diff line number Diff line
@@ -112,6 +112,10 @@ public class ActionHandler<T extends Activity & Addons> extends AbstractActionHa

    @Override
    public boolean dropOn(DragEvent event, RootInfo root) {
        if (!root.supportsCreate() || root.isLibrary()) {
            return false;
        }

        // DragEvent gets recycled, so it is possible that by the time the callback is called,
        // event.getLocalState() and event.getClipData() returns null. Thus, we want to save
        // references to ensure they are non null.
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ class RootItem extends Item {

    @Override
    boolean isDropTarget() {
        return root.supportsCreate() && !root.isLibrary();
        return true;
    }

    @Override
Loading