Skip to content

Instantly share code, notes, and snippets.

View hardikamal's full-sized avatar
🖥️

Hardik Amal hardikamal

🖥️
View GitHub Profile
@casevictor
casevictor / controller.js
Created May 26, 2014 23:40
How to do a cross-platform loading indicator module.
var loading = require('functions').loading;
loading.setMessage('Autenticando...');
loading.show();
setTimeout(function(){
loading.hide();
},5000);
@gabrielemariotti
gabrielemariotti / README.md
Last active August 29, 2015 14:05
Code for Taylor Ling's UI ANIMATION IN PHOTOSHOP – TUTORIAL #1
@viezel
viezel / app.js
Last active August 29, 2015 14:14
appcelerator - HTTP requsts queing system while being offline
//
// Start the app while being offline
// Then after these requests have been cache - go back online
//
var HTTPHelper = require("networkHelper");
// simulate some request while being offline
for(var i = 0; i < 5; i++){
setTimeout(function(){
@slightfoot
slightfoot / MainActivity.java
Last active September 29, 2015 10:55
Fixed Scrolling Header Tab Thingy
package com.example.scrollyheadedlistthingy;
import java.util.ArrayList;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.AbsListView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
@srahim
srahim / app.js
Created April 24, 2012 18:13
Overlay rotate animation.
var win = Titanium.UI.createWindow();
var t = Ti.UI.create2DMatrix();
var identityTransform = Ti.UI.create2DMatrix();
var a = Titanium.UI.createAnimation();
a.transform = t;
a.duration = 1000;
//Function to process the current orientation
@korniltsev
korniltsev / MyActivity.java
Created November 14, 2012 12:48
AutoCompleteTextView sample
package com.example.popup_test;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
@tobsbot
tobsbot / toolbar(v21).xml
Created March 5, 2015 21:11
A linear layout with a view to simulate the toolbar shadow in lollipop on older devices.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
// ==============================================================================
// Create custom loading indicator
// ==============================================================================
var indWin = null;
var actWin = null;
var indicatorShowing = false;
var actInd;
var actIndAndroid;
var screenWidth = Titanium.Platform.displayCaps.platformWidth;
@cliftonlabrum
cliftonlabrum / dataToFromWebViewTitanium.js
Created September 23, 2013 16:32
Passing Data to a webView and back in Titanium.
//Send data to webView in Titanium
var timeGraph = Ti.UI.createWebView({ url:'graphs/timeGraph.html', touchEnabled:true });
timeGraph.addEventListener('load', function(){
Ti.App.fireEvent('graphCareer', series);
});
<!-- Receive data in webView -->
<script type="text/javascript">
@casevictor
casevictor / table.js
Created April 17, 2014 02:50
A way to implement Titanium.UI.SearchBar with custom UI.tableRows using Alloy ( Android and iOS platforms )
//On iOS the default is 'Search', On Android the default is empty
$.search.hintText = 'Deep Search'
if(OS_IOS){
//Equals to tableRow.js new property
$.table.filterAttribute="filter";
}
if(OS_ANDROID){