@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); //noinspection ConstantConditions getSupportActionBar().setDisplayHomeAsUpEnabled(true); mAdsView = (AdView) findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().build(); mAdsView.loadAd(adRequest); mBuildDataTextView = (TextView) findViewById(R.id.version); // Do the time consuming, potentially UI thread-blocking operation. getSupportLoaderManager().restartLoader(QUERY_LOADER_ID, null, mQueryCallbacks).forceLoad(); // Fire a simple Analytics screen event. Tracker tracker = getDependencyResolver().getTracker(); tracker.setScreenName(this.getClass().getSimpleName()); tracker.send(new HitBuilders.ScreenViewBuilder().build()); }
@Override protected void onResume() { super.onResume(); mAdsView.resume(); }
@Override protected void onPause() { super.onPause(); mAdsView.pause(); }