Skip to content

Commit

Permalink
* type adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jan 8, 2016
1 parent aad6bb7 commit 7e5e711
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class SampleActivity extends AppCompatActivity {
//save our header or result
private Drawer result = null;
//save our FastAdapter
private FastAdapter fastAdapter;
private FastAdapter<SampleItem> fastAdapter;

private UndoHelper undoHelper;

Expand Down Expand Up @@ -96,10 +96,10 @@ public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
.build();

//create our FastAdapter which will manage everything
fastAdapter = new FastAdapter();
fastAdapter = new FastAdapter<>();

//create our ItemAdapter which will host our items
final ItemAdapter itemAdapter = new ItemAdapter();
final ItemAdapter<SampleItem> itemAdapter = new ItemAdapter<>();

//
undoHelper = new UndoHelper(itemAdapter, new UndoHelper.UndoListener() {
Expand Down Expand Up @@ -135,7 +135,7 @@ public boolean onLongClick(View v, IAdapter adapter, IItem item, int position) {
rv.setAdapter(itemAdapter.wrap(fastAdapter));

//fill with some sample data
List<IItem> items = new ArrayList<>();
List<SampleItem> items = new ArrayList<>();
for (int i = 1; i <= 100; i++) {
items.add(new SampleItem().withName("Test " + i).withIdentifier(100 + i));
}
Expand Down

0 comments on commit 7e5e711

Please sign in to comment.