samedi 31 janvier 2015

Using actionBar items within a method to navigate the app


How can i use actionbar menu items from within a method. *Somthing like public boolean page2() { WebView webView1 = (webView) findViewById(R.Id.webview1); webView.loardUrl("file:///android_asset/zoo_plant2.html"); { boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()) { case R.id.action_prev: page3(); return true; case R.id.action_next: page1(); return true; } return super.onOptionsItemSelected(item); }} these code gives me errors though. Thanx for the help..





Aucun commentaire:

Enregistrer un commentaire