Skip to content

Instantly share code, notes, and snippets.

View manumaticx's full-sized avatar
👌
i'm okay

Manuel Lehner manumaticx

👌
i'm okay
View GitHub Profile
@manumaticx
manumaticx / log1
Created March 6, 2014 10:38
Modules.Map: ERROR
[WARN] : dalvikvm: VFY: unable to resolve static field 918 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 918 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 913 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 909 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 923 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 920 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: VFY: unable to resolve static field 917 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
[WARN] : dalvikvm: V
@manumaticx
manumaticx / index.xml
Created September 19, 2014 08:49
Split ActionBar Alloy example
<Alloy>
<Window splitActionBar="true">
<Menu>
<!-- Action Items -->
<MenuItem icon="/images/ic_action_edit.png" showAsAction="Ti.Android.SHOW_AS_ACTION_ALWAYS" />
<MenuItem icon="/images/ic_action_important.png" showAsAction="Ti.Android.SHOW_AS_ACTION_ALWAYS" />
<MenuItem icon="/images/ic_action_labels.png" showAsAction="Ti.Android.SHOW_AS_ACTION_ALWAYS" />
function TestView() {
var self = Ti.UI.createWindow({
backgroundColor:'white',
title: 'Test'
});
var cards = [];
for( var i=0; i<=10; i++){
// ALPHABYTES
// Facebook like menu window
var leftMenu = Ti.UI.createWindow({
backgroundColor: 'red',
top: 0,
left: 0,
width: 150,
zIndex: 1
});
@manumaticx
manumaticx / optionsMenu.js
Last active December 18, 2015 16:59
tab-dependend OptionsMenu
// create a tab-dependend OptionsMenu
function createOptionsMenu(e){
var menu = e.menu;
menu.clear();
// tab-dependend part
switch(self.activeTab){
case tab1:
// all menuItems for Tab 1
var menuItem_settings = menu.add({
@manumaticx
manumaticx / toasty.js
Last active December 29, 2015 15:59
Toasty Sample
toasty.show({
title: 'Confirm',
message: 'This is a confirmation.',
type: 'confirm'
});
@manumaticx
manumaticx / app.js
Created December 13, 2013 10:59
Basic Loading Indicator that I used in Titanium Classic Apps
var loading = require('loading');
loading.start();
setTimeout( function(){ loading.stop(); }, 2000 );
@manumaticx
manumaticx / notification.js
Last active January 25, 2016 13:32
Normalized User Notifications
/*
* This is how I notify users about errors, confirmations etc.
* e.g.: "Wrong password", "Registration complete", ...
*
*/
module.exports = (function(){
var notification,
OS_IOS = 'iPhone OS' === Ti.Platform.name,
OS_ANDROID = 'android' === Ti.Platform.name;
@manumaticx
manumaticx / app.js
Last active June 8, 2016 16:23
Underline a word in a Ti.UI.Label
/**
* Underlines a single word of a label
* @param {Ti.UI.Label} _label
* @param {String} _word
*/
function underline(_label, _word) {
if (Ti.Platform.name === 'iPhone OS') {
var text = _label.getText();
var attr = Titanium.UI.iOS.createAttributedString({
text : text,
// Forked from https://gist.github.com/2417902 to fix a small bug
// -----
function PagingControl(scrollableView){
var pages = [];
var page;
var numberOfPages = scrollableView.getViews().length;
// Configuration
var pageColor = "#c99ed5";
var container = Titanium.UI.createView({