Search in sources :

Example 11 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.

the class DrawerTypesFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.recycleview_layout, container, false);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    createAdapter(mRecyclerView);
    return v;
}
Also used : DividerItemDecoration(de.madcyph3r.example.DividerItemDecoration) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 12 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.

the class FunctionallyFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.recycleview_layout, container, false);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    createAdapter(mRecyclerView);
    return v;
}
Also used : DividerItemDecoration(de.madcyph3r.example.DividerItemDecoration) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 13 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project TinyDancer by friendlyrobotnyc.

the class FPSRecyclerView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    ButterKnife.bind(this);
    LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
    layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    setLayoutManager(layoutManager);
    addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL_LIST));
    setAdapter(adapter);
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 14 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project RecyclerViewItemAnimators by gabrielemariotti.

the class ListActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_recycler);
    //Setup Spinner
    setupSpinner();
    //Setup RecyclerView
    mRecyclerView = (RecyclerView) findViewById(R.id.list);
    //mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
    mRecyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
    mAdapter = new SimpleAdapter(this, sCheeseStrings);
    mRecyclerView.setAdapter(mAdapter);
}
Also used : SimpleAdapter(it.gmariotti.recyclerview.itemanimator.demo.adapter.SimpleAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(it.gmariotti.recyclerview.itemanimator.demo.adapter.DividerItemDecoration)

Example 15 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project MultiType by drakeet.

the class TestPayloadActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_list);
    RecyclerView recyclerView = (RecyclerView) findViewById(R.id.list);
    recyclerView.addItemDecoration(new DividerItemDecoration(this, VERTICAL));
    MultiTypeAdapter adapter = new MultiTypeAdapter();
    recyclerView.setAdapter(adapter);
    adapter.register(HeavyItem.class, new HeavyItemViewBinder());
    Items items = new Items();
    for (int i = 0; i < 30; i++) {
        items.add(new HeavyItem("1000" + i));
    }
    adapter.setItems(items);
    adapter.notifyDataSetChanged();
    Toast.makeText(this, "Try to click or long click items", Toast.LENGTH_SHORT).show();
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView) Items(me.drakeet.multitype.Items) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration) MultiTypeAdapter(me.drakeet.multitype.MultiTypeAdapter)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)73 RecyclerView (android.support.v7.widget.RecyclerView)42 View (android.view.View)36 TextView (android.widget.TextView)23 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)19 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)15 ImageView (android.widget.ImageView)14 DividerItemDecoration (com.wm.remusic.widget.DividerItemDecoration)9 Drawable (android.graphics.drawable.Drawable)8 DividerItemDecoration (de.madcyph3r.example.DividerItemDecoration)8 DividerItemDecoration (io.hefuyi.listener.widget.DividerItemDecoration)7 Nullable (android.support.annotation.Nullable)6 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)6 Context (android.content.Context)5 Toolbar (android.support.v7.widget.Toolbar)5 Intent (android.content.Intent)4 ActionBar (android.support.v7.app.ActionBar)4 DividerItemDecoration (com.lzy.demo.base.DividerItemDecoration)4 DividerItemDecoration (org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration)4 TargetApi (android.annotation.TargetApi)3