I have a view that looks like this:
The layout looks like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/content_view"
android:layout_width="wrap_content"
android:layout_height="44dp"
android:paddingStart="12dp"
android:paddingLeft="12dp"
android:paddingEnd="12dp"
android:paddingRight="12dp"
android:paddingBottom="6dp"
android:gravity="bottom"
android:background="@drawable/background"
android:elevation="2dp"
android:clipToPadding="false">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:srcCompat="@drawable/blue_circle" />
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:srcCompat="@drawable/blue_circle" />
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:srcCompat="@drawable/blue_circle" />
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:srcCompat="@drawable/blue_circle" />
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:srcCompat="@drawable/blue_circle" />
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="4dp"
android:layout_marginLeft="4dp"
android:layout_marginEnd="4dp"
android:layout_marginRight="4dp"
app:srcCompat="@drawable/blue_circle" />
</LinearLayout>
What I want to do is change the size of the first ImageView programmatically to 64x64 while animating the changes and push the other blue circles over to adjust for the changes.
Right now, I only have code that changes the width/height to 64x64 WITHOUT any animations:
ViewGroup.LayoutParams layoutParams = firstImageView.getLayoutParams();
layoutParams.width = DisplayUtils.convertDpToPixels(getContext(), 64);
layoutParams.height = DisplayUtils.convertDpToPixels(getContext(), 64);
firstImageView.setLayoutParams(layoutParams);
How can I animate these changes smoothly, while making sure all other blue circles move over to adjust for these changes?
