19 | * Implementers can call getItemAtPosition(position) if they need 20 | * to access the data associated with the selected item. 21 | * 22 | * @param view The view within the AdapterView that was clicked (this 23 | * will be a view provided by the adapter) 24 | * @param position The position of the view in the adapter. 25 | */ 26 | void onItemClick(View view, int position); 27 | } -------------------------------------------------------------------------------- /CoreModule/recycler/src/main/java/com/kymjs/recycler/OnItemLongClickListener.java: -------------------------------------------------------------------------------- 1 | package com.kymjs.recycler; 2 | 3 | /** 4 | * Created by ZhangTao on 9/29/16. 5 | */ 6 | 7 | import android.view.View; 8 | 9 | /** 10 | * Interface definition for a callback to be invoked when an item in this 11 | * view has been clicked and held. 12 | */ 13 | public interface OnItemLongClickListener { 14 | /** 15 | * Callback method to be invoked when an item in this view has been 16 | * clicked and held. 17 | *
18 | * Implementers can call getItemAtPosition(position) if they need to access
19 | * the data associated with the selected item.
20 | *
21 | * @param view The view within the AbsListView that was clicked
22 | * @param position The position of the view in the list
23 | * @return true if the callback consumed the long click, false otherwise
24 | */
25 | boolean onItemLongClick(View view, int position);
26 | }
--------------------------------------------------------------------------------
/CoreModule/recycler/src/main/java/com/kymjs/recycler/RecyclerBin.java:
--------------------------------------------------------------------------------
1 | package com.kymjs.recycler;
2 |
3 | import android.content.Context;
4 | import android.view.View;
5 |
6 | import java.util.ArrayList;
7 |
8 | /**
9 | * 用于视图复用
10 | * Created by ZhangTao on 5/9/16.
11 | */
12 | public class RecyclerBin {
13 | private ArrayList