In textview
, gravity="center_vertical"
means the content in the textview
will be center
and vertical
. you can only see the alignment of text
if textview
is fill_parent
if its wrap_content
then there will be no place for content to have alignment.If you use layout_gravity
here and width and height to wrap_content
then it will place the textview
in the center _vertical of the parent layout.
In imageview
,layout_centerVertical="true".
means place iamge and in center
and vertical
in the parent layout of image (i.e the container of image).