Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
visualstudio,XML:Android:layou-weight不是突然声明的吗?_Xml_Visual Studio - Fatal编程技术网

visualstudio,XML:Android:layou-weight不是突然声明的吗?

visualstudio,XML:Android:layou-weight不是突然声明的吗?,xml,visual-studio,Xml,Visual Studio,我正在做一段时间的布局,我很确定我知道如何使用重量,或重力。但从今天起,VS似乎再也不能对布局重量或布局重力做任何事情了。它有一条绿色下划线,上面写着“未声明的属性”: 。。。另外,我注意到,在我先前构建的xml文件中,这些属性现在也有了绿色下划线 此外,设计师现在只是忽略了所有的权重,因此现在设计成了你知道什么的痛苦 我是做错了什么,还是有问题?我该如何解决这个问题 谢谢。。。构建并重新启动应用程序和程序似乎可以解决这个问题。它仍然强调属性,但现在它在设计器中构建它们 <?xml v

我正在做一段时间的布局,我很确定我知道如何使用重量,或重力。但从今天起,VS似乎再也不能对布局重量或布局重力做任何事情了。它有一条绿色下划线,上面写着“未声明的属性”:


。。。另外,我注意到,在我先前构建的xml文件中,这些属性现在也有了绿色下划线

此外,设计师现在只是忽略了所有的权重,因此现在设计成了你知道什么的痛苦

我是做错了什么,还是有问题?我该如何解决这个问题


谢谢

。。。构建并重新启动应用程序和程序似乎可以解决这个问题。它仍然强调属性,但现在它在设计器中构建它们

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="400dp">
        <LinearLayout
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:layout_height="50dp"
            android:background="#ffffff">
            <LinearLayout
                android:layout_width="0dp"
                android:layout_weight="100"
                android:background="#345543"
                android:layout_height="match_parent">
                <ImageButton
                    android:id="@+id/btn_profilepic_recview_chats"
                    android:background="@drawable/ripple"
                    android:src="@drawable/general_btn_magnefier"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_weight="323"
                android:background="#123321"
                android:layout_height="0dp" />
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:background="#afebff" />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="#ffffff" />
    </LinearLayout>
</android.support.v7.widget.CardView>