use of android.support.v7.widget.LinearLayoutManager in project Signal-Android by WhisperSystems.
the class GiphyFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle bundle) {
super.onActivityCreated(bundle);
this.giphyAdapter = new GiphyAdapter(getActivity(), new LinkedList<GiphyImage>());
this.giphyAdapter.setListener(this);
this.recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
this.recyclerView.setItemAnimator(new DefaultItemAnimator());
this.recyclerView.setAdapter(giphyAdapter);
this.recyclerView.addOnScrollListener(new GiphyScrollListener());
getLoaderManager().initLoader(0, null, this);
}
use of android.support.v7.widget.LinearLayoutManager in project XRecyclerView by jianghejie.
the class DisableExampleActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recyclerview);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mRecyclerView = (XRecyclerView) this.findViewById(R.id.recyclerview);
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecyclerView.setLayoutManager(layoutManager);
mRecyclerView.setLoadingMoreEnabled(false);
mRecyclerView.setPullRefreshEnabled(false);
listData = new ArrayList<String>();
for (int i = 0; i < 15; i++) {
listData.add("item" + i);
}
mAdapter = new MyAdapter(listData);
mRecyclerView.setAdapter(mAdapter);
}
use of android.support.v7.widget.LinearLayoutManager in project okhttp-OkGo by jeasonlzy.
the class OkHttpActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recycler);
initToolBar(toolbar, true, "OkGo功能介绍");
initData();
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
recyclerView.setAdapter(new MainAdapter(this));
}
use of android.support.v7.widget.LinearLayoutManager in project okhttp-OkGo by jeasonlzy.
the class RxActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recycler);
initToolBar(toolbar, true, "OkRx使用示例");
initData();
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
recyclerView.setAdapter(new RxActivity.MainAdapter(this));
}
use of android.support.v7.widget.LinearLayoutManager in project Android-ObservableScrollView by ksoichiro.
the class RecyclerViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recyclerview);
ObservableRecyclerView recyclerView = (ObservableRecyclerView) findViewById(R.id.scrollable);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setHasFixedSize(true);
recyclerView.setScrollViewCallbacks(this);
UiTestUtils.setDummyData(this, recyclerView);
}
Aggregations