pamgeo
pamgeo

Reputation: 33

DecorView Child FrameLayout

Can someone explain to me why does the child of DecorView on my layout is a FrameLayout when I have not defined one?

Here is the xml layout

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_general" >

<ImageView
    android:id="@+id/ivIKUGo"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:src="@drawable/mainbutton_selector" />

<ImageView
    android:id="@+id/imageViewmoto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_marginBottom="150dp"
    android:src="@drawable/motto_buttonpage_hdpi" />

</RelativeLayout>

Thanks

Upvotes: 3

Views: 2572

Answers (1)

user
user

Reputation: 87064

You'll have a LinearLayout between the DecorView and the FrameLayout which holds the content of the Activity if you use a normal theme. If you use a NoTitleBar type of a theme then there is no need for that extra LinearLayout so it's removed leaving the content FrameLayout as the child of the DecorView.

Upvotes: 3

Related Questions