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);
}
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);
}
}
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);
}
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);
}
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);
}
Aggregations