Search in sources :

Example 1 with LinearLayoutManager

use of android.support.v7.widget.LinearLayoutManager in project Onboarding by eoinfogarty.

the class SceneThreeFragment method scrollRecycleViewTo.

private void scrollRecycleViewTo(RecyclerView recyclerView, int offset) {
    LinearLayoutManager layoutManager = ((LinearLayoutManager) recyclerView.getLayoutManager());
    layoutManager.scrollToPositionWithOffset(2, offset);
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 2 with LinearLayoutManager

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

the class MainActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    pager = (RecyclerView) findViewById(R.id.pager);
    pager.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));
    snapperCarr.attachToRecyclerView(pager);
    if (savedInstanceState != null) {
        pickedDocument = savedInstanceState.getParcelable(STATE_PICKED);
        if (pickedDocument != null) {
            show(pickedDocument);
        }
    }
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 3 with LinearLayoutManager

use of android.support.v7.widget.LinearLayoutManager in project photo-picker-plus-android by chute.

the class FragmentRoot method initView.

private void initView(View view) {
    recyclerView = (RecyclerView) view.findViewById(R.id.gcRecyclerViewAssets);
    recyclerView.setHasFixedSize(true);
    if (displayType == DisplayType.LIST && filterType == PhotoFilterType.SOCIAL_MEDIA) {
        final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
        recyclerView.setLayoutManager(linearLayoutManager);
    } else {
        final GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), getResources().getInteger(R.integer.grid_columns_assets));
        recyclerView.setLayoutManager(gridLayoutManager);
    }
    progressBar = (ProgressBar) view.findViewById(R.id.progressBar);
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 4 with LinearLayoutManager

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

the class MainActivity method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setLayoutManager(new LinearLayoutManager(this));
    setAdapter(new IconicAdapter());
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Example 5 with LinearLayoutManager

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

the class MainActivity method onCreate.

@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setLayoutManager(new LinearLayoutManager(this));
    adapter = new IconicAdapter();
    setAdapter(adapter);
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1977 RecyclerView (android.support.v7.widget.RecyclerView)1088 View (android.view.View)823 TextView (android.widget.TextView)353 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)232 ArrayList (java.util.ArrayList)205 ImageView (android.widget.ImageView)186 Intent (android.content.Intent)150 Toolbar (android.support.v7.widget.Toolbar)134 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)129 BindView (butterknife.BindView)126 GridLayoutManager (android.support.v7.widget.GridLayoutManager)124 Bundle (android.os.Bundle)109 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)107 Nullable (android.support.annotation.Nullable)98 ViewGroup (android.view.ViewGroup)82 ItemTouchHelper (android.support.v7.widget.helper.ItemTouchHelper)81 Context (android.content.Context)80 AdapterView (android.widget.AdapterView)70 List (java.util.List)69