@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); /** This will set the bundles saved state */ setContentView(R.layout.download_list); // _adView = (AdView) findViewById(R.id.ad_view); _list = (ListView) findViewById(R.id.list); _list.setDividerHeight(0); // _adView.setListener(new AdViewListener() { // public void onReceiveAd() { // Log.d("MyActivity", "Tap for Tap ad received"); // } // // public void onFailToReceiveAd(String reason) { // Log.d("MyActivity", "Tap for Tap failed to receive ad: " + reason); // } // // public void onTapAd() { // Log.d("MyActivity", "Tap for Tap ad tapped"); // } // }); doAddItems(); ActionBar bar = getSupportActionBar(); bar.setDisplayHomeAsUpEnabled(true); _list.setOnItemClickListener(this); registerForContextMenu(_list); }
@Override public void onPause() { super.onPause(); DownloadService service = getService(); if (service != null) { service.setNextResponder(null); } }
@Override public void onResume() { super.onResume(); DownloadService service = getService(); if (service != null) { service.setNextResponder(this); } doAddItems(); }
@Override protected void onDestroy() { super.onDestroy(); }