I would really appreciate a little assistance in getting my ui complete.
I am trying to implement my own newsfeed list from facebook. The problem I have is for posts which are photo type or video type. The image resolution they send to preview the post is different each time depending on the resolution of the image initially (i think).
What im wanting to do is display this image in the center of a listview like the facebook app does, whilst having a textview at the bottom of the imageview.
My attempts so far only seem to overlay the textview at the bottom of some of the imageviews (depending on their size) and is distorting the image probably due to my width and height values.
This is what i currently trying
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ffffff"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:id="@+id/thumbImage"
android:padding="10dp"
android:focusable="true"
android:background="#ffffff"
android:layout_width="200dp"
android:scaleType="centerInside"
android:layout_height="150dp"
android:layout_centerInParent="true"
/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="180dp"
android:layout_height="50dp"
android:background="#AA000000"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView
android:id="@+id/imagename"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:textColor="#ffffff"
android:text="" /></RelativeLayout></LinearLayout>
and i am also doing this
imageview.setScaleType(ImageView.ScaleType.CENTER_CROP);
Thanks.