【发布时间】:2015-05-11 21:47:49
【问题描述】:
In my main activity contains actionbar tablistener, when the tab is swipe or tab then i load the fragment based on the selection, now fragment listview hides below the main activity action bar, 请参阅下面的屏幕截图
我的 XML 代码:
<?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:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="200dp"
android:scaleType="fitXY"
android:src="@drawable/building" />
<RelativeLayout
android:id="@+id/headertext"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@+id/imageView1"
android:background="@drawable/item_background" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="Sample list view"
android:textColor="@android:color/white"
android:textSize="20sp" />
</RelativeLayout>
</RelativeLayout>
【问题讨论】:
标签: android tabs android-actionbar