So, I'm creating an app and want to have the URL be hidden. Well when I hide the URL bar, and I try to hit the back button on the android emulator it kicks me out of the program completely.
Now, when I do not hide the URL button, and hit the back button it does not kick me out of the program.
So, my question is, I want to hide the URL along with having the back button go back to my main area/menu without kicking me out of the program. I Can anyone help or even point me in the right direction? Thanks! Paul
This is my code:
var openWebpagegoogle = Titanium.UI.createButton({
fullscreen:false,
title:"Notifications",
backgroundImage: "images/button.png",
width:"100%",
height:"12%",
top:"10%",
id: "Notifications",
url:"http://www.google.com", fullscreen:false
});
openWebpagegoogle.addEventListener("click", function(e){
Titanium.Platform.openURL(e.source.hideurl); fullscreen:false //blocks url
// Create a window and add a webview to it that opens your url:
var webviewWindow = Titanium.UI.createWindow({title: 'My Webview Window'}); fullscreen:false
var myWebView = Ti.UI.createWebView({url:e.source.url}); fullscreen:false
webviewWindow.add(myWebView); fullscreen:false
webviewWindow.open(); // Open your new window
})
Now, when I do not hide the URL button, and hit the back button it does not kick me out of the program.
So, my question is, I want to hide the URL along with having the back button go back to my main area/menu without kicking me out of the program. I Can anyone help or even point me in the right direction? Thanks! Paul
This is my code:
var openWebpagegoogle = Titanium.UI.createButton({
fullscreen:false,
title:"Notifications",
backgroundImage: "images/button.png",
width:"100%",
height:"12%",
top:"10%",
id: "Notifications",
url:"http://www.google.com", fullscreen:false
});
openWebpagegoogle.addEventListener("click", function(e){
Titanium.Platform.openURL(e.source.hideurl); fullscreen:false //blocks url
// Create a window and add a webview to it that opens your url:
var webviewWindow = Titanium.UI.createWindow({title: 'My Webview Window'}); fullscreen:false
var myWebView = Ti.UI.createWebView({url:e.source.url}); fullscreen:false
webviewWindow.add(myWebView); fullscreen:false
webviewWindow.open(); // Open your new window
})