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

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

Merge "Fix Tuner icon positioning and size in new layout" into sc-dev

parents c1e0ae04 511768f9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -129,10 +129,10 @@

                <com.android.systemui.statusbar.AlphaOptimizedImageView
                    android:id="@+id/tuner_icon"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:paddingStart="36dp"
                    android:paddingEnd="4dp"
                    android:layout_width="8dp"
                    android:layout_height="8dp"
                    android:layout_gravity="center_horizontal|bottom"
                    android:layout_marginBottom="@dimen/qs_footer_icon_padding"
                    android:src="@drawable/tuner"
                    android:tint="?android:attr/textColorTertiary"
                    android:visibility="invisible" />
+2 −0
Original line number Diff line number Diff line
@@ -420,6 +420,8 @@

    <!-- Padding on each QS Footer Icon to make the icons 20dpx20dp -->
    <dimen name="qs_footer_icon_padding">14dp</dimen>
    <!-- 3/4 of icon width 20dpx20dp -->
    <dimen name="qs_footer_tuner_icon_translation">15dp</dimen>

    <!-- The padding between the notifications and the quick settings container -->
    <dimen name="qs_notification_padding">@dimen/notification_side_paddings</dimen>
+7 −2
Original line number Diff line number Diff line
@@ -75,6 +75,8 @@ public class QSFooterView extends FrameLayout {
    private TouchAnimator mSettingsCogAnimator;

    private View mActionsContainer;
    private View mTunerIcon;
    private int mTunerIconTranslation;

    private OnClickListener mExpandClickListener;

@@ -107,6 +109,7 @@ public class QSFooterView extends FrameLayout {
        mActionsContainer = requireViewById(R.id.qs_footer_actions_container);
        mEditContainer = findViewById(R.id.qs_footer_actions_edit_container);
        mBuildText = findViewById(R.id.build);
        mTunerIcon = requireViewById(R.id.tuner_icon);

        // RenderThread is doing more harm than good when touching the header (to expand quick
        // settings), so disable it for this view
@@ -166,6 +169,9 @@ public class QSFooterView extends FrameLayout {

    private void updateResources() {
        updateFooterAnimator();
        mTunerIconTranslation = mContext.getResources()
                .getDimensionPixelOffset(R.dimen.qs_footer_tuner_icon_translation);
        mTunerIcon.setTranslationX(isLayoutRtl() ? -mTunerIconTranslation : mTunerIconTranslation);
    }

    private void updateFooterAnimator() {
@@ -274,8 +280,7 @@ public class QSFooterView extends FrameLayout {

    private void updateVisibilities(boolean isTunerEnabled) {
        mSettingsContainer.setVisibility(mQsDisabled ? View.GONE : View.VISIBLE);
        mSettingsContainer.findViewById(R.id.tuner_icon).setVisibility(
                isTunerEnabled ? View.VISIBLE : View.INVISIBLE);
        mTunerIcon.setVisibility(isTunerEnabled ? View.VISIBLE : View.INVISIBLE);
        final boolean isDemo = UserManager.isDeviceInDemoMode(mContext);
        mMultiUserSwitch.setVisibility(showUserSwitcher() ? View.VISIBLE : View.GONE);
        if (mEditContainer != null) {