android linearlayout没有已知的子标记错误
我的android应用程序中有以下xml:android linearlayout没有已知的子标记错误,android,xml,android-layout,Android,Xml,Android Layout,我的android应用程序中有以下xml: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/scrollView1" android:layout_width="match_parent" android:l
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/msngr"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo" />
</LinearLayout>
</ScrollView>
到目前为止,这段代码还可以,但我无法在此添加任何其他组件,如TextView、Edittext
我没有收到任何自动建议,并在红线中查看:
<linearlayout> has no known child tags
没有已知的子标记
如何在线性布局中创建组件
请帮助我。这是因为在ScrollView中只能添加一个子视图。。。它无法在其中添加任何其他视图。。。因为ScrollView只包含一个子视图 同时从线性布局中删除空间
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo"/>
</LinearLayout>
这是因为在ScrollView中只能添加一个子视图。。。它无法在其中添加任何其他视图。。。因为ScrollView只包含一个子视图 同时从线性布局中删除空间
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo"/>
</LinearLayout>
在这方面有什么替代方案?我想在ScrollView中进行整个登录,因为您在SCroll view中有一个线性布局,方向是垂直的,在该线性布局中,您可以选择另一个子线性布局,并根据您的要求添加所有要添加的控件。在这方面有什么替代方案?我想在ScrollView中进行整个登录,因为您在SCroll view中有一个方向垂直的线性布局,在该线性布局中,您可以选择另一个子线性布局,并根据需要添加所有要添加的控件。