Skip to content
A mini-browser to Titanium Appcelerator
JavaScript
Find file
Pull request Compare This branch is 26 commits behind Nyvra:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
modules/mini-browser
README.markdown

README.markdown

What is this?

This is a mini-browser module to use in Titanium Appcelerator

How to use it?

You have just to instance the MiniBrowser to a variable, and create it. It will return a Window, and you can do what you want. See these examples:

Parameters

  • url: (STRING) This parameter is the URL to open in the browser
  • barColor: (STRING) The color of navigationBar and toolbar of the browser (example: #000)
  • modal: (BOOL) If you wanna open the browser in a modal window, set it as true. Default is false.
  • showToolbar: (BOOL) If you wanna hide the toolbar of the browser, set it as false. Default is true.

Methods

openBrowser: This method will open your browser (modal or not) in your application.

returnBrowser: This method will return the window of your browser, to open with an TabGroup or customize the Window

Internationalization

The default strings language in this browser is in English. If you wanna translate the strings, you can use the following ids:

  • copy_link
  • open_safari
  • send_by_email
  • cancel
  • close

If you don't know how to internationalize your application, please read this (Wiki - Internationalization)

Examples

Modal Window

var modalBrowser = new MiniBrowser({
    url:"http://www.google.com/",
    barColor:"#000",
    modal:true
});

modalBrowser.openBrowser();

TabGroup

var broser = new MiniBrowser({
    url:"http://www.google.com/",
    barColor:"#000"
});

Ti.UI.currentTab.open(browser.returnBrowser());

Images

Something went wrong with that request. Please try again.