Skip to content

Instantly share code, notes, and snippets.

Ext.application({
name: 'tabtest1',
launch: function() {
Ext.create("Ext.TabPanel", {
fullscreen: true,
tabBar: {
docked: 'bottom',
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Tab test</title>
<link rel="stylesheet"
href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script
src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
<div data-role="page" id="homepage">
<div id="home" data-title="home" data-role="tab" data-icon="home">
<h1>I'm Tab1</h1>
<img src="http://images.apple.com/home/images/hero.jpg" />
</div>
<div id="test" data-title="test" data-role="tab" data-icon="info">
<h1>I'm Tab2</h1>
</div>
</div>
Ext.application({
name: 'tabtest1',
launch: function() {
var tabItems = [];
var pages = Ext.query('div[data-role=page]');
var main = pages[0]; //take first page as main page
var tabs = Ext.query('div[data-role=tab]', main);
@Override
public WebResourceResponse shouldInterceptRequest(WebView view,
String url) {
if(url.startsWith("asset://")) {
String fileName = url.substring(8);
try {
WebResourceResponse resp = new WebResourceResponse("text/javascript", "UTF-8", MyActivity.this.getAssets().open(fileName));
return resp;
} catch (IOException e) {
Ext.define('Ext.data.proxy.Facebook', {
extend: 'Ext.data.proxy.Proxy',
alias: 'proxy.facebook',
constructor: function(config) {
this.callParent([config]);
this.api = config.api;
//ensures that the reader has been instantiated properly
this.setReader(this.reader);
var myStroe = Ext.create('Ext.data.Store', {
model: 'Group',
proxy: {
type: 'facebook',
api : '/me/groups'
},
autoLoad: false,
autoSync: true
});
namespace java com.thrift.gen
service Computer {
i64 add(1: i64 a, 2: i64 b),
}
var thrift = require('thrift');
var Computer = require('./gen-nodejs/Computer.js'),
ttypes = require('./gen-nodejs/computer_types.js');
var server = thrift.createServer(Computer, {
add: function(a, b, callback) {
console.log("function called:", a+b);
callback(a+b);
},
import com.thrift.gen.*;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TTransportException;