Search in sources :

Example 6 with RecyclerView

use of android.support.v7.widget.RecyclerView in project cw-omnibus by commonsguy.

the class RecyclerViewActivity method getRecyclerView.

public RecyclerView getRecyclerView() {
    if (rv == null) {
        rv = new RecyclerView(this);
        setContentView(rv);
    }
    return (rv);
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView)

Example 7 with RecyclerView

use of android.support.v7.widget.RecyclerView in project cw-omnibus by commonsguy.

the class HorizontalDividerItemDecoration method onDrawOver.

@Override
public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) {
    int left = parent.getPaddingLeft();
    int right = parent.getWidth() - parent.getPaddingRight();
    int childCount = parent.getChildCount();
    for (int i = 0; i < childCount - 1; i++) {
        View child = parent.getChildAt(i);
        RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
        int top = child.getBottom() + params.bottomMargin;
        int bottom = top + divider.getIntrinsicHeight();
        divider.setBounds(left, top, right, bottom);
        divider.draw(c);
    }
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View)

Example 8 with RecyclerView

use of android.support.v7.widget.RecyclerView in project cw-omnibus by commonsguy.

the class RecyclerViewFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    RecyclerView rv = new RecyclerView(getActivity());
    rv.setHasFixedSize(true);
    return (rv);
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView)

Example 9 with RecyclerView

use of android.support.v7.widget.RecyclerView in project cw-omnibus by commonsguy.

the class RecyclerViewActivity method getRecyclerView.

public RecyclerView getRecyclerView() {
    if (rv == null) {
        rv = new RecyclerView(this);
        setContentView(rv);
    }
    return (rv);
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView)

Example 10 with RecyclerView

use of android.support.v7.widget.RecyclerView in project cw-omnibus by commonsguy.

the class RecyclerViewActivity method getRecyclerView.

public RecyclerView getRecyclerView() {
    if (rv == null) {
        rv = new RecyclerView(this);
        rv.setHasFixedSize(true);
        setContentView(rv);
    }
    return (rv);
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView)

Aggregations

RecyclerView (android.support.v7.widget.RecyclerView)893 View (android.view.View)605 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)509 TextView (android.widget.TextView)191 GridLayoutManager (android.support.v7.widget.GridLayoutManager)130 ImageView (android.widget.ImageView)118 ArrayList (java.util.ArrayList)89 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)73 ViewGroup (android.view.ViewGroup)60 Toolbar (android.support.v7.widget.Toolbar)56 StaggeredGridLayoutManager (android.support.v7.widget.StaggeredGridLayoutManager)53 Intent (android.content.Intent)49 ItemTouchHelper (android.support.v7.widget.helper.ItemTouchHelper)46 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)42 Context (android.content.Context)41 Bundle (android.os.Bundle)40 Nullable (android.support.annotation.Nullable)40 Handler (android.os.Handler)37 Rect (android.graphics.Rect)36 Paint (android.graphics.Paint)33