I need to make a listview run behind a textview on Android but I don't know how to do it. It means that the textview location is fixed, my responsibility is to scroll the listview开发者_JAVA技巧 which run behind the textview. I appreciate any help from you. Thank you.
I think this should work
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Sample" android:layout_alignParentTop="True"/>
<ListView android:layout_width=="fill_parent" android:layout_height="fill_parent"/>
</RelativeLayout>
You can use any other parameters you want to align textview where you like on the screen.
Edit: Corrected the order, TextView need to be added first and then ListView in order for TextView to stay on top
精彩评论