My layout structure is like this
LinearLayout FrameLayout ImageView ImageView FrameLayout TextView LinearLayout
I
you have to set your ImageView's layout gravity top i.e. android:layout_gravity="top" in the XML resource file, or from code: FrameLayout.LayoutParams.gravity = Gravity.TOP