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

Commit 460f707e authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "Animate volume dialog expansion/contraction." into nyc-dev

am: e86ac2f0

* commit 'e86ac2f0':
  Animate volume dialog expansion/contraction.

Change-Id: Icbca2a9a418f8461d5134c7e10eff7f0556554d8
parents 39dd4939 e86ac2f0
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -29,15 +29,10 @@
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="8dp"
        android:paddingStart="8dp">
        android:paddingStart="8dp"
        android:animateLayoutChanges="true" >

        <!-- volume rows added and removed here! :-) -->
        <LinearLayout
                android:id="@+id/volume_row_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/volume_button_size"
                android:orientation="vertical"/>

        <include layout="@layout/volume_zen_footer" />

+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:clipChildren="false"
    android:id="@+id/volume_dialog_row" >
    android:id="@+id/volume_dialog_row"
    android:paddingEnd="@dimen/volume_button_size" >

    <TextView
        android:id="@+id/volume_row_header"
+5 −8
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ public class VolumeDialog implements TunerService.Tunable {
    private CustomDialog mDialog;
    private ViewGroup mDialogView;
    private ViewGroup mDialogContentView;
    private ViewGroup mVolumeRowContainer;
    private ImageButton mExpandButton;
    private final List<VolumeRow> mRows = new ArrayList<>();
    private final SpTexts mSpTexts;
@@ -207,8 +206,6 @@ public class VolumeDialog implements TunerService.Tunable {
            }
        });
        mDialogContentView = (ViewGroup) mDialog.findViewById(R.id.volume_dialog_content);
        mVolumeRowContainer =
                (ViewGroup) mDialogContentView.findViewById(R.id.volume_row_container);
        mExpanded = false;
        mExpandButton = (ImageButton) mDialogView.findViewById(R.id.volume_expand_button);
        mExpandButton.setOnClickListener(mClickExpand);
@@ -309,7 +306,7 @@ public class VolumeDialog implements TunerService.Tunable {
        if (!mRows.isEmpty()) {
            addSpacer(row);
        }
        mVolumeRowContainer.addView(row.view);
        mDialogContentView.addView(row.view, mDialogContentView.getChildCount() - 2);
        mRows.add(row);
    }

@@ -321,7 +318,7 @@ public class VolumeDialog implements TunerService.Tunable {
            if (i > 0) {
                addSpacer(row);
            }
            mVolumeRowContainer.addView(row.view);
            mDialogContentView.addView(row.view, mDialogContentView.getChildCount() - 2);
        }
    }

@@ -332,7 +329,7 @@ public class VolumeDialog implements TunerService.Tunable {
                .getDimensionPixelSize(R.dimen.volume_slider_interspacing);
        final LinearLayout.LayoutParams lp =
                new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, h);
        mVolumeRowContainer.addView(v, lp);
        mDialogContentView.addView(v, mDialogContentView.getChildCount() - 2, lp);
        row.space = v;
    }

@@ -613,8 +610,8 @@ public class VolumeDialog implements TunerService.Tunable {
            if (row.ss == null || !row.ss.dynamic) continue;
            if (!mDynamic.get(row.stream)) {
                mRows.remove(i);
                mVolumeRowContainer.removeView(row.view);
                mVolumeRowContainer.removeView(row.space);
                mDialogContentView.removeView(row.view);
                mDialogContentView.removeView(row.space);
            }
        }
    }