• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Problem with creating a simple Menu in Browser view.

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I started learning Android recently and created a project just for my testing.

The main page will be LoginPage.java, which has a submit button.
When the submit button is clicked, it will bring up WebPage.java (which has a WebView object to display the http site).
Until this point, everything looks ok.

But then I want to create a Menu in the WebPage view, where I can go back to the LoginPage view.
I override the onCreateOptionsMenu() and the onOptionsItemSelected().
But what shows up is the original default menu from the Android phone.

I'm wondering if anyone has any advice? Thanks in advance for all the help.
Below is my code: LoginPage.java + webPage.java

;--------------------------------------------------------------------------------------------;

LoginPage.java:


WebPage.java:
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic