use of android.support.v7.widget.LinearLayoutManager in project Android-ObservableScrollView by ksoichiro.
the class FillGapRecyclerViewActivity method createScrollable.
@Override
protected ObservableRecyclerView createScrollable() {
ObservableRecyclerView recyclerView = (ObservableRecyclerView) findViewById(R.id.scroll);
recyclerView.setScrollViewCallbacks(this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setHasFixedSize(false);
setDummyDataWithHeader(recyclerView, mFlexibleSpaceImageHeight);
return recyclerView;
}
use of android.support.v7.widget.LinearLayoutManager in project Android-ObservableScrollView by ksoichiro.
the class StickyHeaderRecyclerViewActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stickyheaderrecyclerview);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
mHeaderView = findViewById(R.id.header);
ViewCompat.setElevation(mHeaderView, getResources().getDimension(R.dimen.toolbar_elevation));
mToolbarView = findViewById(R.id.toolbar);
mRecyclerView = (ObservableRecyclerView) findViewById(R.id.recycler);
mRecyclerView.setScrollViewCallbacks(this);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setHasFixedSize(false);
View headerView = LayoutInflater.from(this).inflate(R.layout.recycler_header, null);
setDummyDataWithHeader(mRecyclerView, headerView);
}
use of android.support.v7.widget.LinearLayoutManager in project Android-ObservableScrollView by ksoichiro.
the class FillGap2RecyclerViewActivity method createScrollable.
@Override
protected ObservableRecyclerView createScrollable() {
ObservableRecyclerView recyclerView = (ObservableRecyclerView) findViewById(R.id.scroll);
recyclerView.setScrollViewCallbacks(this);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setHasFixedSize(false);
setDummyDataWithHeader(recyclerView, mFlexibleSpaceImageHeight);
return recyclerView;
}
use of android.support.v7.widget.LinearLayoutManager in project Signal-Android by WhisperSystems.
the class ContactSelectionListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.contact_selection_list_fragment, container, false);
emptyText = ViewUtil.findById(view, android.R.id.empty);
recyclerView = ViewUtil.findById(view, R.id.recycler_view);
swipeRefresh = ViewUtil.findById(view, R.id.swipe_refresh);
fastScroller = ViewUtil.findById(view, R.id.fast_scroller);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
swipeRefresh.setEnabled(getActivity().getIntent().getBooleanExtra(REFRESHABLE, true) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN);
return view;
}
use of android.support.v7.widget.LinearLayoutManager in project Signal-Android by WhisperSystems.
the class ConversationListFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
final View view = inflater.inflate(R.layout.conversation_list_fragment, container, false);
reminderView = ViewUtil.findById(view, R.id.reminder);
list = ViewUtil.findById(view, R.id.list);
fab = ViewUtil.findById(view, R.id.fab);
if (archive)
fab.setVisibility(View.GONE);
else
fab.setVisibility(View.VISIBLE);
reminderView.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss() {
updateReminders();
}
});
list.setHasFixedSize(true);
list.setLayoutManager(new LinearLayoutManager(getActivity()));
list.setItemAnimator(new DeleteItemAnimator());
new ItemTouchHelper(new ArchiveListenerCallback()).attachToRecyclerView(list);
return view;
}
Aggregations