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

Commit 7f53b9bc authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge changes If9baf6db,Idc6c5d7d into nyc-mr1-dev

* changes:
  Fix DismissView cannot be clicked sometimes after boot
  Fix RTL issue of ImageFloatingTextView
parents a05719a2 b926666a
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@ public class ImageFloatingTextView extends TextView {
    /** Number of lines from the top to indent */
    private int mIndentLines;

    /** Resolved layout direction */
    private int mResolvedDirection = LAYOUT_DIRECTION_UNDEFINED;

    public ImageFloatingTextView(Context context) {
        this(context, null);
    }
@@ -82,7 +85,7 @@ public class ImageFloatingTextView extends TextView {
                margins[i] = endMargin;
            }
        }
        if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
        if (mResolvedDirection == LAYOUT_DIRECTION_RTL) {
            builder.setIndents(margins, null);
        } else {
            builder.setIndents(null, margins);
@@ -91,6 +94,19 @@ public class ImageFloatingTextView extends TextView {
        return builder.build();
    }

    @Override
    public void onRtlPropertiesChanged(int layoutDirection) {
        super.onRtlPropertiesChanged(layoutDirection);

        if (layoutDirection != mResolvedDirection && isLayoutDirectionResolved()) {
            mResolvedDirection = layoutDirection;
            if (mIndentLines > 0) {
                // Invalidate layout.
                setHint(getHint());
            }
        }
    }

    @RemotableViewMethod
    public void setHasImage(boolean hasImage) {
        setNumIndentLines(hasImage ? 2 : 0);
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ public class NotificationStackScrollLayout extends ViewGroup
    private boolean mIsBeingDragged;
    private int mLastMotionY;
    private int mDownX;
    private int mActivePointerId;
    private int mActivePointerId = INVALID_POINTER;
    private boolean mTouchIsClick;
    private float mInitialTouchX;
    private float mInitialTouchY;