Sunday, May 25, 2014

Android Center Vertically in Parent

Instinctively, it's to use this, but sometimes it works, and sometimes it doesn't work:
android:layout_centerVertical="true"

When it doesn't work, try this:
android:layout_gravity="center_vertical"

Not sure why but that's just how it is.

No comments:

Post a Comment