Reputation: 277
I was wondering what would be the easiest way to align the vertical center of an image to the bottom of the screen in android. It doesn't seem like it should be that hard, but I can't seem to find anything with an answer to this.
Upvotes: 0
Views: 54
Reputation: 139
You could use a FrameLayout and position the ImageView at the Bottom center of it.
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:layout_gravity="center_horizontal|bottom" />
</FrameLayout>
Upvotes: 1