DecorView儿童的FrameLayout [英] DecorView Child FrameLayout

查看:120
本文介绍了DecorView儿童的FrameLayout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么DecorView对我的布局孩子的时候我还没有定义之一的FrameLayout有人能解释一下吗?

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

下面是XML布局

<?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>

感谢

推荐答案

您将有一个的LinearLayout 之间的 DecorView 的FrameLayout 持有如果你用一个正常的主题活动的内容。如果使用 NoTitleBar 输入一个主题,那么就没有必要额外的LinearLayout 所以它除去,留下的内容的FrameLayout 作为孩子的 DecorView

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.

这篇关于DecorView儿童的FrameLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆