Created
February 28, 2015 08:31
-
-
Save mzgreen/d3197b0faeb0f8103b71 to your computer and use it in GitHub Desktop.
PartTwoActivity setting padding on RecyclerView
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); | |
int paddingTop = Utils.getToolbarHeight(PartTwoActivity.this) + Utils.getTabsHeight(PartTwoActivity.this); | |
recyclerView.setPadding(recyclerView.getPaddingLeft(), paddingTop, recyclerView.getPaddingRight(), recyclerView.getPaddingBottom()); | |
recyclerView.setLayoutManager(new LinearLayoutManager(this)); | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment