Created
February 15, 2015 11:12
-
-
Save mzgreen/40201cd9aa1054aebfb4 to your computer and use it in GitHub Desktop.
HideOnScrollExample - MainActivity class
This file contains hidden or 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
public class MainActivity extends ActionBarActivity { | |
private Toolbar mToolbar; | |
private ImageButton mFabButton; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
initToolbar(); | |
mFabButton = (ImageButton) findViewById(R.id.fabButton); | |
initRecyclerView(); | |
} | |
private void initToolbar() { | |
mToolbar = (Toolbar) findViewById(R.id.toolbar); | |
setSupportActionBar(mToolbar); | |
setTitle(getString(R.string.app_name)); | |
mToolbar.setTitleTextColor(getResources().getColor(android.R.color.white)); | |
} | |
private void initRecyclerView() { | |
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView); | |
recyclerView.setLayoutManager(new LinearLayoutManager(this)); | |
RecyclerAdapter recyclerAdapter = new RecyclerAdapter(createItemList()); | |
recyclerView.setAdapter(recyclerAdapter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where is creatItemList() method?