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

Commit 5bac3f05 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use default attr instead of styleable"

parents 8f2e6498 61bfdb3a
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -154,12 +154,5 @@
    <declare-styleable name="CaptionsToggleImageButton">
        <attr name="optedOut" format="boolean" />
    </declare-styleable>

    <!-- Theme attributes used to style the appearance of expanded Bubbles -->
    <declare-styleable name="BubbleExpandedView">
        <attr name="android:colorBackgroundFloating" />
        <attr name="android:dialogCornerRadius" />
    </declare-styleable>

</resources>
+6 −8
Original line number Diff line number Diff line
@@ -275,17 +275,15 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList
    }

    void applyThemeAttrs() {
        TypedArray ta = getContext().obtainStyledAttributes(R.styleable.BubbleExpandedView);
        int bgColor = ta.getColor(
                R.styleable.BubbleExpandedView_android_colorBackgroundFloating, Color.WHITE);
        float cornerRadius = ta.getDimension(
                R.styleable.BubbleExpandedView_android_dialogCornerRadius, 0);
        final TypedArray ta = mContext.obtainStyledAttributes(
                new int[] {
                        android.R.attr.colorBackgroundFloating,
                        android.R.attr.dialogCornerRadius});
        int bgColor = ta.getColor(0, Color.WHITE);
        float cornerRadius = ta.getDimensionPixelSize(1, 0);
        ta.recycle();

        // Update triangle color.
        mPointerDrawable.setTint(bgColor);

        // Update ActivityView cornerRadius
        if (ScreenDecorationsUtils.supportsRoundedCornersOnWindows(mContext.getResources())) {
            mActivityView.setCornerRadius(cornerRadius);
        }