我希望我的标题和日期文字视图显示在图片的底部,而不是它们当前所在的顶部。我希望它们像现在一样重叠图像,但是然后标题然后在相同背景下的日期下面,所以它们看起来在同一个"框中#34;
{{1}}
答案 0 :(得分:0)
使用RelativeLayout
代替
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#55000000">
<uk.ac.kent.sc580.edanews.GridViewItem
android:id="@+id/listImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical
android:layout_alignParentBottom="true">
<TextView
android:id="@+id/listTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white" />
<TextView
android:id="@+id/listDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@android:color/white" />
</LinearLayout>
</RelativeLayout>