I’ve got a FrameLayout like this. It contains two overlaying images:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/my_frame"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:id="@+id/image_areas"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitCenter"
android:src="@drawable/image_mask"
android:visibility="invisible"/>
<ImageView
android:id="@+id/image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitCenter"
android:src="@drawable/walker"/>
</FrameLayout>
I want to add a TextView below this FrameLayout. Is it possible or does FrameLayout take all the space on the screen? Can I put my FrameLayout and TextView in a sort of LinearLayout?
Edit: The problem is that my TextView is not displayed when Im putting it in a LinearLayout or RelaiveLayout together with my FrameLayout.
You can use a
RelativeLayoutto hold both yourFrameLayoutandTextViewand in yourFrameLayoutuse theandroid:layout_aboveatribute. Something like this: