use of me.drakeet.multitype.Items in project GwellDemo by dxsdyhm.
the class SerialAppActivity method initRC.
private void initRC() {
txt_num = (TextView) findViewById(R.id.txt_num);
rcSerialApp = (RecyclerView) findViewById(R.id.rc_serialapp);
rcSerialApp.setLayoutManager(new LinearLayoutManager(this));
items = new Items();
adapter = new MultiTypeAdapter(items);
SerialAppProvider provider = new SerialAppProvider();
adapter.register(String.class, provider);
rcSerialApp.setAdapter(adapter);
}
use of me.drakeet.multitype.Items in project MultiType by drakeet.
the class WeiboActivity method loadRemoteData.
private void loadRemoteData() {
List<Weibo> weiboList = WeiboJsonParser.fromJson(JSON_FROM_SERVICE);
// atomically
items = new Items(items);
items.addAll(0, weiboList);
adapter.setItems(items);
adapter.notifyDataSetChanged();
}
Aggregations