This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb.init({ | |
onscreenready: function (element, id) { | |
if (id == "main") { | |
var item = element.createElement('div'); | |
item.setAttribute('data-bb-type','item'); | |
item.setAttribute('data-bb-title','my title'); | |
item.innerHTML = 'my description'; | |
item.setAttribute('data-bb-img','foo.png'); | |
element.getElementById('mylist').appendItem(item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb.init({ | |
onscreenready: function (element, id) { | |
if (id == "main") { | |
var item = document.createElement('div'); | |
item.setAttribute('data-bb-type','item'); | |
item.setAttribute('data-bb-title','my title'); | |
item.innerHTML = 'my description'; | |
item.setAttribute('data-bb-img','foo.png'); | |
document.getElementById('mylist').appendItem(item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb.init({ | |
onscreenready: function (element, id) { | |
if (id == "main") { | |
// code to be executed before the "main" screen is loaded. | |
} else if (id == "add") { | |
// code to be executed before the "add" screen is loaded. | |
} | |
}, | |
ondomready: function (element, id) { | |
if (id == "main") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-bb-type="item" onclick="alert('this was clicked')" class="bb-hires-image-list-item" onmouseover="this.setAttribute('class','bb-hires-image-list-item-hover')" onmouseout="this.setAttribute('class','bb-hires-image-list-item')" x-blackberry-focusable="true"><img src="images/test.png"> | |
<div class="details"> | |
<span class="title">Title goes here</span> | |
<span class="accent-text"></span> | |
<div class="description">A description is welcome.</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-bb-type="item" data-bb-title="Title goes here" data-bb-img="images/test.png" onclick="alert('this was clicked')">A description is welcome.</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nativeControls.showTabBar(); | |
nativeControls.showTabBarItems("books", "finished", "about"); | |
nativeControls.selectTabBarItem("books"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nativeControls.createTabBarItem( | |
"books", | |
"Books", | |
"/www/tabs/book.png", | |
{"onSelect": function() { | |
// Do something | |
}} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nativeControls = window.plugins.nativeControls; | |
nativeControls.createTabBar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="phonegap-1.0.0.js" type="text/javascript" charset="utf-8"></script> | |
<script src="NativeControls.js" type="text/javascript" charset="utf-8"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<!-- Android | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> | |
<meta charset="utf-8">--> | |
<!-- iPad/iPhone specific css below, add after your main css > |