after the side slip deletion is introduced into the layout of item, the button that slips out can be deleted normally, but the setOnItemClickListener () method of adapter is invalid. How to solve this problem if you click item and do not respond?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ll_my_post"
android:orientation="vertical">
<!---->
<com.guanaj.easyswipemenulibrary.EasySwipeMenuLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/content_click"
app:contentView="@+id/content"
app:leftMenuView="@+id/left"
app:rightMenuView="@+id/right">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="@+id/tv_my_post_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="RNG.MSong..." />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp">
<TextView
android:id="@+id/temp_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="" />
<TextView
android:id="@+id/tv_host_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/temp_tv"
android:text=""
android:textColor="@color/color_orange" />
<TextView
android:id="@+id/tv_mypost_comments_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="550" />
<ImageView
android:padding="3dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/tv_mypost_comments_count"
android:src="@mipmap/comments" />
<TextView
android:id="@+id/tv_like_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/tv_mypost_comments_count"
android:paddingRight="30dp"
android:text="220" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_margin="3dp"
android:layout_toLeftOf="@id/tv_like_count"
android:src="@mipmap/heart" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/right"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/colorRed"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_my_message_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="20dp"
android:text=""
android:textColor="@color/white" />
</LinearLayout>
</com.guanaj.easyswipemenulibrary.EasySwipeMenuLayout>
</LinearLayout>
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
//TODO:,item
Toast.makeText(this, "l"+position, Toast.LENGTH_SHORT).show();
}