Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

NameCard 类和 activity_attrribute_setters.xml 文件有误 #49

@taowu750

Description

@taowu750

在 activity_attribute_setters.xml 文件中,这样使用了 NameCard 类:
<com.liangfeizc.databinding.view.NameCard
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginEnd="@dimen/largePadding"
android:layout_marginLeft="@dimen/largePadding"
android:layout_marginRight="@dimen/largePadding"
android:layout_marginStart="@dimen/largePadding"
android:gravity="center"
app:age="27"
app:firstName="@{@string/firstName}"
app:lastName="@{@string/lastName}"/>
经过我的测试发现,只有 app:age 属性能够使用,app:firstName 属性和 app:lastName 属性会报错。

我将 style.xml 中的 NameCard style 改为如下形式就可以正常使用了:




Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions