命名空间规范说uri未在android studio中注册

时间:2017-08-10 22:18:15

标签: android screen-orientation

我正在尝试将屏幕更改功能添加到项目中。但是,当我尝试将主布局添加到layout_land目录时,副本有错误

未注册URI

关于命名空间规范。

我需要用框架布局替换根元素,但不能指定要使用的名称空间。

如何使这项基本功能正常运作?

再次,任何帮助...

这是代码。

        <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="match_parent"
   android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:orientation="horizontal">

        <TextView
            android:id="@+id/question_text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:padding="24dp"

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:orientation="horizontal"

            <Button
                android:id="@+id/true_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:text="@string/true_button" />

            <Button
                android:id="@+id/false_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:text="@string/false_button" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <Button
                android:id="@+id/next_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:drawableRight="@drawable/arrow_right"
                android:text="@string/next_button"
                android:gravity="right" />

        </LinearLayout>
    </LinearLayout>
</FrameLayout>

0 个答案:

没有答案