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

Commit 027c7499 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Move volume dialog expander

Bug: 33760714
Bug: 32727078
Test: manual
Change-Id: I06934bf140483957b734d5b1b20e3c7c6b7b4497
parent c445da8f
Loading
Loading
Loading
Loading
+23 −15
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
    android:layout_height="wrap_content"
    android:layout_marginBottom="@dimen/volume_dialog_margin_bottom"
    android:background="@drawable/volume_dialog_background"
    android:paddingTop="@dimen/volume_dialog_padding_top"
    android:translationZ="4dp" >

    <LinearLayout
@@ -33,12 +34,7 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingEnd="@dimen/volume_button_size"
                android:paddingTop="@dimen/volume_dialog_collapsed_padding_top"
            android:orientation="vertical" >
            <View android:id="@+id/spacer"
                  android:layout_width="match_parent"
                  android:layout_height="@dimen/volume_dialog_expanded_spacer"
                  android:visibility="gone"/>
            <!-- volume rows added and removed here! :-) -->
        </LinearLayout>

@@ -48,6 +44,20 @@
        <include layout="@layout/tuner_zen_mode_panel" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/volume_dialog_content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_alignParentEnd="true"
        android:layout_alignParentTop="true"
        android:layout_marginEnd="@dimen/volume_expander_margin_end" >
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:maxLines="1"
            android:textAppearance="@style/TextAppearance.Volume.Header" />
        <com.android.keyguard.AlphaOptimizedImageButton
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
@@ -60,9 +70,7 @@
            android:src="@drawable/ic_volume_collapse_animation"
            android:background="@drawable/ripple_drawable"
            tools:ignore="RtlHardcoded"
            android:layout_alignParentEnd="true"
            android:layout_alignParentTop="true"
            android:layout_marginTop="@dimen/volume_expander_margin_top"
            android:layout_marginEnd="@dimen/volume_expander_margin_end"/>
            />

    </LinearLayout>
</RelativeLayout>
+1 −2
Original line number Diff line number Diff line
@@ -600,8 +600,7 @@

    <!-- Volume dialog root view bottom margin, at rest -->
    <dimen name="volume_dialog_margin_bottom">4dp</dimen>
    <dimen name="volume_dialog_collapsed_padding_top">8dp</dimen>
    <dimen name="volume_dialog_expanded_spacer">14dp</dimen>
    <dimen name="volume_dialog_padding_top">8dp</dimen>
    <dimen name="volume_dialog_padding_end">40dp</dimen>

    <dimen name="volume_row_padding_bottom">9.4dp</dimen>
+0 −1
Original line number Diff line number Diff line
@@ -622,7 +622,6 @@ public class VolumeDialog implements TunerService.Tunable {
        if (!mShowing) {
            trimObsoleteH();
        }
        Util.setVisOrGone(mDialogRowsView.findViewById(R.id.spacer), mExpanded);
        // apply changes to all rows
        for (final VolumeRow row : mRows) {
            final boolean isActive = row == activeRow;
+11 −1
Original line number Diff line number Diff line
@@ -140,7 +140,17 @@ public class VolumeDialogMotion {
                        final float v = (Float) mChevronPositionAnimator.getAnimatedValue();
                        final int posY = chevronPosY();
                        mChevron.setTranslationY(posY + v + -mDialogView.getTranslationY());
                    }})
                    }
                })
                .withEndAction(new Runnable() {
                    @Override
                    public void run() {
                        if (mChevronPositionAnimator == null) return;
                        // reposition chevron
                        final int posY = chevronPosY();
                        mChevron.setTranslationY(posY + -mDialogView.getTranslationY());
                    }
                })
                .start();

        mContentsPositionAnimator = ValueAnimator.ofFloat(-chevronDistance(), 0)