Search in sources :

Example 16 with MultiTypeAdapter

use of me.drakeet.multitype.MultiTypeAdapter 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);
}
Also used : Items(me.drakeet.multitype.Items) SerialAppProvider(adapter.SerialAppProvider) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) MultiTypeAdapter(me.drakeet.multitype.MultiTypeAdapter)

Aggregations

MultiTypeAdapter (me.drakeet.multitype.MultiTypeAdapter)16 Items (me.drakeet.multitype.Items)11 RecyclerView (android.support.v7.widget.RecyclerView)8 GridLayoutManager (android.support.v7.widget.GridLayoutManager)4 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)4 Category (me.drakeet.multitype.sample.common.Category)3 TextItem (me.drakeet.multitype.sample.normal.TextItem)3 CategoryItemViewBinder (me.drakeet.multitype.sample.common.CategoryItemViewBinder)2 AlarmInfoProvider (adapter.AlarmInfoProvider)1 LogInfoProvider (adapter.LogInfoProvider)1 RecordFileProvider (adapter.RecordFileProvider)1 SensorProvider (adapter.SensorProvider)1 SerialAppProvider (adapter.SerialAppProvider)1 SuppressLint (android.annotation.SuppressLint)1 Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)1 SpanSizeLookup (android.support.v7.widget.GridLayoutManager.SpanSizeLookup)1 Category (com.jweihao.jdemo.bean.Category)1 Post (com.jweihao.jdemo.bean.Post)1