Skip to content

Instantly share code, notes, and snippets.

View artanisdesign's full-sized avatar

Gergely Cziva artanisdesign

View GitHub Profile
@artanisdesign
artanisdesign / node.sh
Last active August 29, 2015 14:11 — forked from adamcbrewer/node.sh
# This command will make sure the process persists
# even after you log out of a session
node server.js >/dev/null 2>&1 &
function showgallery(){
Titanium.Media.openPhotoGallery({
success:function(event){
var cropRect = event.cropRect;
var image = event.media;
Ti.API.debug('Our type was: '+event.mediaType);
if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO){
var uri = image.nativePath;
Titanium.App.addEventListener("playvideo", function (e) {
win11 = Titanium.UI.createWindow({
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT],
title: "Video",
zIndex: 222222
});
var activeMovie = Titanium.Media.createVideoPlayer({
fullscreen: !0,
autoplay: !0,
@artanisdesign
artanisdesign / app.js
Created June 25, 2012 19:22 — forked from pec1985/app.js
Pull to Refresh in android, plus a demo
/*
Copyright 2011 Pedro Enrique
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@artanisdesign
artanisdesign / app.js
Created June 25, 2012 19:21 — forked from pec1985/app.js
Cool background color for iPhone
var win = Ti.UI.createWindow({
backgroundColor:'stripped'
});
win.open();
@artanisdesign
artanisdesign / zscroll.html
Created June 5, 2012 07:02 — forked from cers/zscroll.html
Scrolling along the Z-Axis
<html>
<head>
<title>Scrolling along the Z-Axis</title>
<!--
Example from http://eng.wealtfront.com
Assumes browser window is sized at a height of 400px (the size of the black box).
-->
<style>
body{height:600px;}
#viewport {
@artanisdesign
artanisdesign / app.js
Created June 4, 2012 13:04 — forked from iskugor/app.js
How to append a row to particular section in Titanium
(function() {
var win = Ti.UI.createWindow();
var section1 = Ti.UI.createTableViewSection({
headerTitle:'Header 1'
});
for (var i=0; i < 4; i++) {
section1.add(Ti.UI.createTableViewRow({
title:'Row '+i
}));
}
@artanisdesign
artanisdesign / gist:2867609
Created June 4, 2012 10:11 — forked from mattapperson/gist:1621570
titanium android tabbar DOWN
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
@artanisdesign
artanisdesign / PagingControl.js
Created April 19, 2012 05:28 — forked from raulriera/PagingControl.js
Custom paging control for scrollableViews for Titanium Appcelerator
// I was unhappy about there was close to no control over the "pageControl"
// in scrollableViews, so I hacked my own
// -----
var pages = [];
var page;
var numberOfPages = 0;
// Configuration
var pageColor = "#c99ed5";
@artanisdesign
artanisdesign / InfiniteScrollingTableView.js
Created January 5, 2012 01:11 — forked from dawsontoth/InfiniteScrollingTableView.js
Infinite loading table view for iOS and Android.
/**
* We're going to create an infinite loading table view. Whenever you get close to the bottom, we'll load more rows.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Create our UI elements.
*/
var table = Ti.UI.createTableView({ top: 0, right: 0, bottom: 0, left: 0 });