Skip to content

Instantly share code, notes, and snippets.

View vivekgidmare's full-sized avatar

Vivek Gidmare vivekgidmare

  • Bengaluru
View GitHub Profile
@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'
//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
});
<Alloy>
<Window module="xp.ui">
<Label>Hello World</Label>
</Window>
</Alloy>
// Android - SMSView - Expandable TextArea
/*
* 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
*
public class SmoothCircularIndeterminateProgressBarDrawable
extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
/*
* Copyright 2014 Chris Banes
*
* 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
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)
@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();
@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;