LinerLayout中的无效参数:layout.weight?

时间:2016-06-04 01:15:32

标签: android xml

我只是喜欢官方的android traning,但我收到一个错误,这是LinerLayout中的无效参数:layout.weight。

<?xml version="1.0" encoding="utf-8"?>
<LinerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation = "horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:showIn="@layout/activity_my">

    <EditText android:id = "@+id/edit_message"
        android:layout_weight = "1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:hint = "@string/edit_message"/>
    <Button
        android:layout_width = "wrap_content"
        android:layout_height = "wrap_content"
        android:text = "@string/button_send"/>

</LinerLayout>

1 个答案:

答案 0 :(得分:1)

没有 LinerLayout ,它应该是 LinearLayout