Skip to content

Instantly share code, notes, and snippets.

View vivekgidmare's full-sized avatar

Vivek Gidmare vivekgidmare

  • Bengaluru
View GitHub Profile
<Alloy>
<Window module="xp.ui">
<Label>Hello World</Label>
</Window>
</Alloy>
//Application Window Component Constructor
function ApplicationWindow() {
//load component dependencies
var FirstView = require('ui/common/FirstView');
//create component instance
var self = Ti.UI.createWindow({
backgroundColor : '#ffffff',
borderRadius : 6
});
@vivekgidmare
vivekgidmare / app.tss
Created September 27, 2013 06:33 — forked from FokkeZB/app.tss
".btn": {
borderSize: 1,
borderColor: '#1881f9',
borderRadius: 3,
color: '#1881f9',
height: 26,
style: Ti.UI.iPhone.SystemButtonStyle.PLAIN,
font: {
fontSize: 15,
fontFamily: 'HelveticaNeue'
@vivekgidmare
vivekgidmare / progress_ring_bg.xml
Last active October 28, 2015 08:18
Circular Progress ring customization for usage see comment
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="720">
<!--To Increase speed increase toDegree value in multiple of 360-->
<shape
android:innerRadius="20dp"
android:shape="ring"
@vivekgidmare
vivekgidmare / activity.xml
Last active October 20, 2015 09:40
Transparent StatusBar,Actionar Hack
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
@vivekgidmare
vivekgidmare / HideKey.java
Created September 23, 2015 19:50
Hide KayBoard
//Hide the keyboard
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mNameText.getWindowToken(), 0);
@vivekgidmare
vivekgidmare / KeyBoardHide.java
Created August 30, 2015 14:57
Hide Keyboard by calling this method
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow((null == getCurrentFocus()) ? null : getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
@vivekgidmare
vivekgidmare / EndlessRecyclerOnScrollListener.java
Last active August 29, 2015 14:27 — forked from ssinss/EndlessRecyclerOnScrollListener.java
Endless RecyclerView OnScrollListener
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;
@vivekgidmare
vivekgidmare / twitter.js
Created May 5, 2015 11:44
Twitter auth
var exports = exports || this;
exports.Twitter = (function(global) {
var K = function() {
},
isAndroid = Ti.Platform.osname === "android",
jsOAuth = require('/twitter/jsOAuth-1.3.1');
// var utility = require("/utility");
var APP = require('utility');
// APP.Ui.showLoader('Loading...');
// APP.Ui.hideLoader();
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)