Search in sources :

Example 1 with NormalLineDecoration

use of com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration in project CustomViews by AndroidStudy233.

the class NewspaperFrament method initRecyclerView.

private void initRecyclerView() {
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    NormalRecyclerAdapter adapter = new NormalRecyclerAdapter(getActivity());
    recyclerView.setAdapter(adapter);
    // 是否观看DrawOver方法的效果
    NormalLineDecoration.enableDrawOver = false;
    NormalLineDecoration lineDecoration = new NormalLineDecoration(getActivity(), LinearLayoutManager.VERTICAL, 3, 0xffE4E1E9);
    recyclerView.addItemDecoration(lineDecoration);
}
Also used : NormalRecyclerAdapter(com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) NormalLineDecoration(com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration)

Example 2 with NormalLineDecoration

use of com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration in project CustomViews by AndroidStudy233.

the class BooksFragment method initRecyclerView.

private void initRecyclerView() {
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    NormalRecyclerAdapter adapter = new NormalRecyclerAdapter(getActivity());
    recyclerView.setAdapter(adapter);
    // 是否观看DrawOver方法的效果
    NormalLineDecoration.enableDrawOver = false;
    NormalLineDecoration lineDecoration = new NormalLineDecoration(getActivity(), LinearLayoutManager.VERTICAL, 3, 0xffE4E1E9);
    recyclerView.addItemDecoration(lineDecoration);
}
Also used : NormalRecyclerAdapter(com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) NormalLineDecoration(com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration)

Example 3 with NormalLineDecoration

use of com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration in project CustomViews by AndroidStudy233.

the class PictureFrament method initRecyclerView.

private void initRecyclerView() {
    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
    NormalRecyclerAdapter adapter = new NormalRecyclerAdapter(getActivity());
    recyclerView.setAdapter(adapter);
    // 是否观看DrawOver方法的效果
    NormalLineDecoration.enableDrawOver = false;
    NormalLineDecoration lineDecoration = new NormalLineDecoration(getActivity(), LinearLayoutManager.VERTICAL, 3, 0xffE4E1E9);
    recyclerView.addItemDecoration(lineDecoration);
}
Also used : NormalRecyclerAdapter(com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) NormalLineDecoration(com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration)

Example 4 with NormalLineDecoration

use of com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration in project CustomViews by AndroidStudy233.

the class RecyclerItemDecorationActivity method initUI.

private void initUI() {
    recycler_main.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
    NormalRecyclerAdapter adapter = new NormalRecyclerAdapter(this);
    recycler_main.setAdapter(adapter);
    // 给条目加上分割线
    // 是否观看DrawOver方法的效果
    NormalLineDecoration.enableDrawOver = false;
    NormalLineDecoration lineDecoration = new NormalLineDecoration(this, LinearLayoutManager.VERTICAL, 3, 0xffE4E1E9);
    recycler_main.addItemDecoration(lineDecoration);
}
Also used : NormalRecyclerAdapter(com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) NormalLineDecoration(com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)4 NormalRecyclerAdapter (com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter)4 NormalLineDecoration (com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration)4