Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
- setSupportActionBar(toolbar);
- DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
- ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
- this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
- drawer.addDrawerListener(toggle);
- toggle.syncState();
- NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
- navigationView.setNavigationItemSelectedListener(this);
- }
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- // Load an ad into the AdMob banner view.
- AdView adView = (AdView) findViewById(R.id.adView);
- AdRequest adRequest = new AdRequest.Builder()
- .setRequestAgent("android_studio:ad_template").build();
- adView.loadAd(adRequest);
- // Toasts the test ad message on the screen. Remove this after defining your own ad unit ID.
- Toast.makeText(this, TOAST_TEXT, Toast.LENGTH_LONG).show();
- }
Add Comment
Please, Sign In to add comment