aspose file tools*
The moose likes Android and the fly likes Problem with creating a simple Menu in Browser view. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Problem with creating a simple Menu in Browser view." Watch "Problem with creating a simple Menu in Browser view." New topic
Author

Problem with creating a simple Menu in Browser view.

Susan Smith
Ranch Hand

Joined: Oct 13, 2007
Posts: 223
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:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with creating a simple Menu in Browser view.
 
Similar Threads
Cannot find the problem in the code
getting null pointer
Creating Database and Tables
SharedPreference not working
public void onClick(View v) { // error