I am trying out and learning Jetpack Compose. There I have
Columns {
//..
}
or
Rows{
//..
}
with simple UI elements like ImageViews, which are then shown horizontically or vertically. I already navigate through for instance a row and highlight currently selected ImageView.
My intention is I would like to select an ImageView in that row and change its position somewhere else in that row ... with an animation:
- Navigate to a
ImageViewwith left and right arrowkeys (already done) - Select currently with e.g. enter key (already done)
- Animation: Selected
ImageView(from step 2) shall move slightly up - Animation: Press left and right to move up animated
ImageView(from step 3) to indicate new position. I would also change that image views opacity. - Animation: I also think of to separate adjacent
ImageViewsto indicate where to drop the previously selectedImageView.
Since I am new to Composables, I've heard something about Modifier.animations(), but I do not really know the best way to realize the animations in step 3-5? Maybe there is an example app/project with nice animations?!