我的 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: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
我如何在线性布局中使用组件?
请帮助我。