Search in sources :

Example 1 with NormalRecyclerAdapter

use of com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter 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 NormalRecyclerAdapter

use of com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter 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 NormalRecyclerAdapter

use of com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter 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 NormalRecyclerAdapter

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

the class FollowScollToolbarAct method initRecyclerView.

private void initRecyclerView() {
    layoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
    recyclerView.setLayoutManager(layoutManager);
    NormalRecyclerAdapter adapter = new NormalRecyclerAdapter(this);
    recyclerView.setAdapter(adapter);
    // 控制FAB点击滑动(这里是滑动到0所以无所谓  但是要是滑动到后面的位置就要这样做)
    recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {

        @Override
        public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
            super.onScrollStateChanged(recyclerView, newState);
            if (mShouldScroll) {
                mShouldScroll = false;
                smoothMoveToPosition(recyclerView, mToPosition);
            }
        }
    });
}
Also used : NormalRecyclerAdapter(com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter) RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 5 with NormalRecyclerAdapter

use of com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter 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)6 NormalRecyclerAdapter (com.shiqkuangsan.mycustomviews.adapter.NormalRecyclerAdapter)6 NormalLineDecoration (com.shiqkuangsan.mycustomviews.adapter.itemdecoration.NormalLineDecoration)4 RecyclerView (android.support.v7.widget.RecyclerView)1