Skip to content

Instantly share code, notes, and snippets.

View stevenmirabito's full-sized avatar

Steven Mirabito stevenmirabito

View GitHub Profile
@stevenmirabito
stevenmirabito / android_prefs
Created July 2, 2011 16:22 — forked from vindriaoc/android_prefs
Emulate The Native Android Preferences Grid (Tweaked to feel even more native!)
// the following code is both the logic and examples of using it
var win = Titanium.UI.currentWindow;
// I've set anyDensity to true in my app and this function enables the UI to properly scale
// you can safely delete this function and all references to it if you'd like
var adj = function(pixels) {
if(Titanium.Platform.name == 'iPhone OS') {
return pixels;
} else {