Skip to content

Instantly share code, notes, and snippets.

View iskugor's full-sized avatar

Ivan Škugor iskugor

View GitHub Profile
@iskugor
iskugor / gist:1475851
Created December 14, 2011 09:22
Tabgroup crash
12-14 10:19:14.730: D/Window(1018): unable to find valid activity for decor view
12-14 10:19:14.740: D/AndroidRuntime(1018): Shutting down VM
12-14 10:19:14.740: W/dalvikvm(1018): threadid=1: thread exiting with uncaught exception (group=0x400b4760)
12-14 10:19:14.740: E/TiApplication(1018): (main) [588,15842] Sending event: exception on thread: main msg:android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@408c43a0 is not valid; is your activity running?; Titanium 1.9.0,2011/12/13 23:20,93a63c1
12-14 10:19:14.740: E/TiApplication(1018): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@408c43a0 is not valid; is your activity running?
12-14 10:19:14.740: E/TiApplication(1018): at android.view.ViewRoot.setView(ViewRoot.java:446)
12-14 10:19:14.740: E/TiApplication(1018): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:181)
12-14 10:19:14.740: E/TiApplication(1018): at android.view.WindowManagerImpl
@iskugor
iskugor / app.js
Created December 14, 2011 13:52
Titanium tabgroup crash (FIXED in 2.0)
var button = Ti.UI.createButton({
title: 'Click me!'
});
var win = Ti.UI.createWindow({
navBarHidden: true,
backgroundColor: '#000'
});
win.add(button);
var win = Ti.UI.createWindow({
backgroundColor: '#39f'
});
var tableView = Ti.UI.createTableView({
data: [{ title: 'Row 1' }, { title: 'Row 2' }]
});
tableView.addEventListener('click', function(e) {
@iskugor
iskugor / app.js
Created December 16, 2011 11:40
Titanium insert after functionality
var win = Ti.UI.createWindow({
backgroundColor: '#39f',
layout: 'vertical'
});
var wrapper = Ti.UI.createView({
layout: 'vertical'
});
var label1 = Ti.UI.createLabel({
@iskugor
iskugor / app.js
Created December 21, 2011 13:09
Titanium manual dimension calculation
var win = Ti.UI.createWindow({
layout: 'vertical',
backgroundColor: '#000'
});
var view = Ti.UI.createView({
backgroundColor: '39c',
//height: '70%',
layout: 'vertical'
});
@iskugor
iskugor / AndroidManifest.xml
Created January 9, 2012 12:35
Android hardware accelerator & tabs width
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adriatic.test" android:versionCode="1"
android:versionName="1">
<uses-sdk android:minSdkVersion="11" />
<!-- TI_MANIFEST -->
<application android:icon="@drawable/appicon"
android:label="Test Application" android:name="TestApplication"
@iskugor
iskugor / gist:1632243
Created January 18, 2012 09:54
Nokia N9 error message
Device not working properly
Try updating the device software with Nokia Software Updater. If the problem persists, contact the nearest Nokia Care point.
Security problem (sysuid):
/usr/lib/libconbtdui.so.0.0.1
@iskugor
iskugor / app.js
Created February 2, 2012 13:12
How to get table view row object from row index in Titanium
var win = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var aTableView = Ti.UI.createTableView();
var data = [
Ti.UI.createTableViewRow({title:'Row 1', hasChild:true, color:'red', header:'First'}),
Ti.UI.createTableViewRow({title:'Row 2', hasDetail:true, color:'green'}),
@iskugor
iskugor / app.js
Created February 9, 2012 13:02
Remove all child elements in Titanium
function removeAllChildren(viewObject){
//copy array of child object references because view's "children" property is live collection of child object references
var children = viewObject.children.slice(0);
for (var i = 0; i < children.length; ++i) {
viewObject.remove(children[i]);
}
}
@iskugor
iskugor / .log
Created February 28, 2012 15:48
Titanium Studio error log
Titanium Studio, build: 1.0.8.201201262211
(c) Copyright 2011 by Appcelerator, Inc. All rights reserved.
Build: jenkins-titanium-rcp-master-136 (origin/master)
Date: 26 January 2012, 22:14:21
Host OS: Windows XP
OS Arch: x86
JRE Version: 1.6.0_24