markzhai / DataBindingAdapter

Super simple RecyclerView adapter using Data Binding Technology.
Apache License 2.0
243 stars 34 forks source link

How i use long click in xml? #6

Open iceuncle opened 7 years ago

iceuncle commented 7 years ago

only with Decorator?

markzhai commented 7 years ago

not related with this library, but a data binding question I think.

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:onClick="@{() -> presenter.onItemClick(item)}"
    android:onLongClick="@{() -> presenter.onItemLongClick(item)}"
    android:weightSum="4"
    android:padding="15dp">
AndreyMolochko commented 4 years ago

@markzhai It doesn't work, because "Unknown attribute android:onLongClick"