ImageView Alignment Trick
If you pay attention to ImageView when it’s not bounded by a ViewGroup layout, it is ALWAYS aligned in the center of its parent. Seriously, you cannot set any kind of “gravity” to make it change its aligning position.
I have troubled with it this morning, and finally I’ve found one trick through it, apply the attribute “scaleType” with value of “fitStart” then it would be aligned to the left of parent, of “fitEnd” to align to the right of parent. Not a completely perfect solution but it’s a good workaround.
<ImageView android:id="@+id/ivTitle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scaleType="fitStart" />
Hope you like it!