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

Commit f1c8adc9 authored by Michael Jurka's avatar Michael Jurka Committed by Android (Google) Code Review
Browse files

Merge "Bug fixes in Recents"

parents bd5c9768 0e8063a3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
            <ImageView android:id="@+id/app_thumbnail_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="invisible"
            />
        </FrameLayout>

@@ -71,6 +72,7 @@
            android:singleLine="true"
            android:ellipsize="marquee"
            android:visibility="invisible"
            android:textColor="@color/status_bar_recents_app_label_color"
        />

        <TextView android:id="@+id/app_description"
+2 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
            <ImageView android:id="@+id/app_thumbnail_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="invisible"
            />
        </FrameLayout>

@@ -67,6 +68,7 @@
            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textColor="@color/status_bar_recents_app_label_color"
        />

        <View android:id="@+id/recents_callout_line"
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
        <ImageView android:id="@+id/app_thumbnail_image"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="invisible"
        />
    </FrameLayout>

@@ -63,6 +64,7 @@
        android:layout_marginTop="32dip"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:textColor="@color/status_bar_recents_app_label_color"
    />

    <View android:id="@+id/recents_callout_line"
+1 −0
Original line number Diff line number Diff line
@@ -23,5 +23,6 @@
    <drawable name="status_bar_background">#ff000000</drawable>
    <drawable name="status_bar_recents_background">#b3000000</drawable>
    <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
    <color name="status_bar_recents_app_label_color">#ffffffff</color>
    <drawable name="status_bar_notification_row_background_color">#ff000000</drawable>
</resources>
+11 −4
Original line number Diff line number Diff line
@@ -41,9 +41,10 @@ public class SwipeHelper {
    public static final int Y = 1;

    private float SWIPE_ESCAPE_VELOCITY = 100f; // dp/sec
    private int MAX_ESCAPE_ANIMATION_DURATION = 500; // ms
    private int MAX_DISMISS_VELOCITY = 1000; // dp/sec
    private static final int SNAP_ANIM_LEN = SLOW_ANIMATIONS ? 1000 : 250; // ms
    private int DEFAULT_ESCAPE_ANIMATION_DURATION = 200; // ms
    private int MAX_ESCAPE_ANIMATION_DURATION = 400; // ms
    private int MAX_DISMISS_VELOCITY = 2000; // dp/sec
    private static final int SNAP_ANIM_LEN = SLOW_ANIMATIONS ? 1000 : 150; // ms

    public static float ALPHA_FADE_START = 0f; // fraction of thumbnail width
                                                 // where fade starts
@@ -126,7 +127,10 @@ public class SwipeHelper {
        } else if (pos < viewSize * (1.0f - ALPHA_FADE_START)) {
            result = 1.0f + (viewSize * ALPHA_FADE_START + pos) / fadeSize;
        }
        return result;
        // Make .03 alpha the minimum so you always see the item a bit-- slightly below
        // .03, the item disappears entirely (as if alpha = 0) and that discontinuity looks
        // a bit jarring
        return Math.max(0.03f, result);
    }

    // invalidate the view's own bounds all the way up the view hierarchy
@@ -213,7 +217,10 @@ public class SwipeHelper {
            duration = Math.min(duration,
                                (int) (Math.abs(newPos - getTranslation(animView)) * 1000f / Math
                                        .abs(velocity)));
        } else {
            duration = DEFAULT_ESCAPE_ANIMATION_DURATION;
        }

        ObjectAnimator anim = createTranslationAnimation(animView, newPos);
        anim.setInterpolator(new LinearInterpolator());
        anim.setDuration(duration);
Loading