我的线性布局有什么问题,以及我有多个根标签

时间:2015-04-23 16:12:06

标签: xml android-studio android-gradle

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".NotepadV1">

    <TextView android:text="@string/hello_world" android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

</RelativeLayout>

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="wrap_content">

    <ListView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@id/android:list"/>

    <TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@id/android:empty" android:text="@string/no_notes"/>

</LinearLayout>

我已经尝试了多种方法来解决我的问题,但无法弄明白。我正在使用Android工作室的记事本教程。

0 个答案:

没有答案