Created
July 4, 2017 05:53
-
-
Save kiwiandroiddev/a035a7f5639831168f0a1b0d15335761 to your computer and use it in GitHub Desktop.
First cut of Main activity code for Distraction-free reading sample app Part 1
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 AppCompatActivity { | |
| private Toolbar toolbar; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| setupToolbar(); | |
| } | |
| private void setupToolbar() { | |
| toolbar = (Toolbar) findViewById(R.id.toolbar); | |
| setSupportActionBar(toolbar); | |
| getSupportActionBar().setDisplayShowTitleEnabled(true); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment