Created
February 28, 2015 08:16
-
-
Save mzgreen/e108819d31a9e675452b to your computer and use it in GitHub Desktop.
Implementation of onMove method in PartTwoActivity class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void initRecyclerView() { | |
final RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView); | |
recyclerView.setLayoutManager(new LinearLayoutManager(this)); | |
RecyclerAdapter recyclerAdapter = new RecyclerAdapter(createItemList()); | |
recyclerView.setAdapter(recyclerAdapter); | |
recyclerView.setOnScrollListener(new HidingScrollListener(this) { | |
@Override | |
public void onMoved(int distance) { | |
mToolbarContainer.setTranslationY(-distance); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment