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

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

Enable drag & drop -> Springload for breadcrumb.

Bug: 29519481
Change-Id: I54d98c48c08153c22b2f01c7728187927c4fe1a2
(cherry picked from commit 81d903bc083807c6048ac9ce1d1d3ca18b6643a3)
parent 64969a35
Loading
Loading
Loading
Loading
+42 −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.
-->

<ripple
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res/com.android.documentsui"
    android:color="?attr/colorControlHighlight">
    <item
        android:id="@android:id/mask"
        android:drawable="@android:color/white"/>

    <item>
        <selector>
            <item
                app:state_highlighted="true"
                android:drawable="@color/item_breadcrumb_background_hovered"/>
            <item
                app:state_highlighted="false"
                android:drawable="@android:color/transparent">
                <corners
                    android:topLeftRadius="2dp"
                    android:topRightRadius="2dp"
                    android:bottomLeftRadius="2dp"
                    android:bottomRightRadius="2dp"
                />
            </item>
        </selector>
    </item>
</ripple>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@

            <com.android.documentsui.HorizontalBreadcrumb
                android:id="@+id/breadcrumb"
                android:layout_marginRight="20dp"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

+6 −3
Original line number Diff line number Diff line
@@ -28,17 +28,20 @@
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="wrap_content"
  android:layout_height="match_parent"
  android:layout_height="@dimen/breadcrumb_item_height"
  android:layout_alignParentTop="true"
  android:gravity="center_vertical"
  android:orientation="horizontal">

    <TextView
    <com.android.documentsui.DragOverTextView
        android:id="@+id/breadcrumb_text"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:gravity="center_vertical"
        android:textAppearance="@android:style/TextAppearance.Material.Widget.ActionBar.Title" />
        android:paddingRight="@dimen/breadcrumb_item_padding"
        android:paddingLeft="@dimen/breadcrumb_item_padding"
        android:textAppearance="@android:style/TextAppearance.Material.Widget.ActionBar.Title"
        android:background="@drawable/breadcrumb_item_background" />

    <ImageView
        android:id="@+id/breadcrumb_arrow"
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
        <attr name="colorActionMode" format="color"/>
    </declare-styleable>

    <declare-styleable name="RootItemView">
    <declare-styleable name="HighlightedItemView">
        <attr name="state_highlighted" format="boolean"/>
    </declare-styleable>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -43,5 +43,6 @@
    <!-- TODO: Would be nice to move this to a color-set, but not sure how to support animation -->
    <color name="item_doc_background">#fffafafa</color>
    <color name="item_doc_background_selected">#ffe0f2f1</color>
    <color name="item_breadcrumb_background_hovered">#1affffff</color>

</resources>
Loading