// @Param adapterClassName : Optional, if not provided, the generated Adapter class name will be
// [Adapter + Name of component without Activity, Fragment or Dialog keyword
// In this case , the adapter class name will be SampleAdapter
@AdapterAnnotation(
// adapterClassName = "MyAdapter",
itemType = String.class,
viewHolderClass = MyViewHolder.class,
layoutId = R.layout.item_list)
public class SampleActivity extends AppCompatActivity {
public ArrayList<String> itemList = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sample);
new SampleAdapter.Builder(itemList)
.setItemClickListener(new ItemClickListener() {
@Override
public void itemClicked(View view, int position) {
}
})
.setItemLongClickListener(new ItemLongClickListener() {
@Override
public void itemLongClicked(View view, int position) {
}
}).build();
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
mohsenafshar/binding-adapter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
WIP
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published