Skip to content

Instantly share code, notes, and snippets.

@JcMinarro
JcMinarro / LicensesActivity.java
Created June 5, 2014 12:30 — forked from cyrilmottier/LicensesActivity.java
"Open source licenses" screen
package com.cyrilmottier.android.citybikes;
import android.os.Bundle;
import com.cyrilmottier.android.avelov.R;
import com.cyrilmottier.android.citybikes.app.BaseActivity;
public class LicensesActivity extends BaseActivity {
private WebView mWebView;
@JcMinarro
JcMinarro / MyApp.java
Last active August 29, 2015 14:04 — forked from artem-zinnatullin/MyApp.java
Set font to all application component
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
}
}
@JcMinarro
JcMinarro / git-git
Last active August 29, 2015 14:04 — forked from swankjesse/git-git
git-git
echo '#!/bin/bash' > ~/bin/git-git
echo 'git $*' >> ~/bin/git-git
chmod u+x ~/bin/git-git
import android.util.Log;
import android.widget.AbsListView;
import android.widget.ListView;
import org.jetbrains.annotations.NotNull;
/**
* Makes a listview to have a pull down, this is a wrapper.
* Is not a good idea to override a ListView because there
* are a lot of libraries and we dont know when we need one.
*/
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
// enables hardware accelerated rounded corners
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/
@JcMinarro
JcMinarro / AppRater.java
Last active August 29, 2015 14:06 — forked from rharter/AppRater.java
AppRater
package com.ryanharter.android.util;
import android.content.Context;
import android.content.SharedPreferences;
/**
* Keeps track of the number of app launches, and days since first launch, and
* provides an easy way to determine whether you should show a rating prompt
* or not.
*/
@JcMinarro
JcMinarro / crashException
Created September 13, 2014 10:23
LiveTemplate AndroidStudio
Crashlytics.log(android.util.Log.ERROR, TAG, "[$CLASS$ - $METHOD_NAME$] - (line $LINE$): " + "$END$");
Crashlytics.logException(e);
@JcMinarro
JcMinarro / Debug.java
Last active August 29, 2015 14:06 — forked from scruffyfox/Debug.java
package in.lib;
import android.util.Log;
import java.util.Collection;
public class Debug
{
private static long timeseed = 0L;
private final static String LOG_TAG = "DEBUG";
@JcMinarro
JcMinarro / HLog.java
Last active August 29, 2015 14:06 — forked from romainpiel/HLog.java
package com.example.myapplication;
import android.util.Log;
/**
* HLog
* romainpiel
* 13/09/2014
*/
public class HLog {
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
apply plugin: 'hugo'
apply plugin: 'crashlytics'
def versionMajor = 1
def versionMinor = 7
def versionPatch = 0
def versionBuild = 0 // bump for dogfood builds, public betas, etc.