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

Commit 1e9044f1 authored by Rohan Shah's avatar Rohan Shah Committed by Android (Google) Code Review
Browse files

Merge "Move the signal traffic indicators out of the QS icon circle bounds"

parents 366ac0a8 28191fc4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ Copyright (C) 2014 The Android Open Source Project
        android:height="32dp"
        android:viewportWidth="6.0"
        android:viewportHeight="24.0"
        android:tint="?android:attr/textColorSecondary">
        android:tint="?android:attr/colorAccent">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M6.000000,15.700000l-3.000000,5.599999 -3.000000,-5.599999z"/>
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ Copyright (C) 2014 The Android Open Source Project
        android:height="32dp"
        android:viewportWidth="6.0"
        android:viewportHeight="24.0"
        android:tint="?android:attr/textColorSecondary">
        android:tint="?android:attr/colorAccent">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M0.000000,13.700000l3.000000,-5.700000 3.000000,5.700000z"/>
+2 −0
Original line number Diff line number Diff line
@@ -618,6 +618,8 @@
         type icon is wide for the tile in quick settings. -->
    <dimen name="wide_type_icon_start_padding_qs">3dp</dimen>

    <dimen name="signal_indicator_to_icon_frame_spacing">3dp</dimen>

    <!-- The maximum width of the navigation bar ripples. -->
    <dimen name="key_button_ripple_max_width">95dp</dimen>

+8 −2
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ public class SignalTileView extends QSIconViewImpl {
    private ImageView mOut;

    private int mWideOverlayIconStartPadding;
    private int mSignalIndicatorToIconFrameSpacing;

    public SignalTileView(Context context) {
        super(context);
@@ -48,8 +49,13 @@ public class SignalTileView extends QSIconViewImpl {
        mIn = addTrafficView(R.drawable.ic_qs_signal_in);
        mOut = addTrafficView(R.drawable.ic_qs_signal_out);

        setClipChildren(false);
        setClipToPadding(false);

        mWideOverlayIconStartPadding = context.getResources().getDimensionPixelSize(
                R.dimen.wide_type_icon_start_padding_qs);
        mSignalIndicatorToIconFrameSpacing = context.getResources().getDimensionPixelSize(
                R.dimen.signal_indicator_to_icon_frame_spacing);
    }

    private ImageView addTrafficView(int icon) {
@@ -99,10 +105,10 @@ public class SignalTileView extends QSIconViewImpl {
        boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
        int left, right;
        if (isRtl) {
            right = mIconFrame.getLeft();
            right = getLeft() - mSignalIndicatorToIconFrameSpacing;
            left = right - indicator.getMeasuredWidth();
        } else {
            left = mIconFrame.getRight();
            left = getRight() + mSignalIndicatorToIconFrameSpacing;
            right = left + indicator.getMeasuredWidth();
        }
        indicator.layout(
+2 −0
Original line number Diff line number Diff line
@@ -85,6 +85,8 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView {
                ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        params.setMargins(0, padding, 0, padding);
        mIconFrame.addView(mIcon, params);
        mIconFrame.setClipChildren(false);
        mIconFrame.setClipToPadding(false);

        mTileBackground = newTileBackground();
        if (mTileBackground instanceof RippleDrawable) {