Android中所有根布局的父布局是什么
它将显示framelayout是线性布局的父布局。请告诉 1.框架布局如何作为线性布局的父布局? 2.默认情况下,窗口具有框架布局Android中所有根布局的父布局是什么,android,android-linearlayout,parent-child,android-framelayout,gravity,Android,Android Linearlayout,Parent Child,Android Framelayout,Gravity,它将显示framelayout是线性布局的父布局。请告诉 1.框架布局如何作为线性布局的父布局? 2.默认情况下,窗口具有框架布局 请帮助我。提前谢谢。你说得对,DecorView将使用FrameLayout存储应用程序设置的所有内容。你可以阅读ad 1 FrameLayout的源代码,它可以是任何视图的父视图,包括LinearLayout,ad 2 check it:Window.getDecorView()谢谢SuiteAnshi。你能给我发一个链接/源代码让我了解decorview的更多知
请帮助我。提前谢谢。你说得对,
DecorView
将使用FrameLayout
存储应用程序设置的所有内容。你可以阅读ad 1 FrameLayout的源代码,它可以是任何视图的父视图,包括LinearLayout,ad 2 check it:Window.getDecorView()谢谢SuiteAnshi。你能给我发一个链接/源代码让我了解decorview的更多知识吗。但我一直认为源代码是最好的教程。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world"
/>
</LinearLayout>
linearLayout=(LinearLayout) findViewById(R.id.linearLayout);
System.out.println(linearLayout.getParent());