How to insert ImageView on top of ListView in android? I have a ListView almost full screen and I need to put a picture on top of the ListView. How can this be done?
- Layout in the Studio - Silento
|
2 answers
You can try it
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ListView android:layout_width="match_parent" android:layout_height="match_parent"> </ListView> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" /> </RelativeLayout> - Thank you! Not really understand the difference RelariveLayout and LinearLayout, now figured out! - user200355
|
Use FrameLayout or RelativeLayout to place elements on top of each other.
- Thanks, used RelativeLayout! - user200355
|