Skip to content

Instantly share code, notes, and snippets.

View Aracem's full-sized avatar
👨‍🚀
Jobandtalent and Storybeat

Marcos Trujillo Aracem

👨‍🚀
Jobandtalent and Storybeat
View GitHub Profile
@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
}
}
@Aracem
Aracem / SystemUiHelper.java
Last active August 29, 2015 14:05 — forked from chrisbanes/SystemUiHelper.java
Helper to easily change the Screen/window aspect, like FullScreen, Inmersive ...
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
/*
* You can find all the Play Service Packages here
* http://developer.android.com/reference/gms-packages.html
*/
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
import android.support.v4.view.ViewPager;
import android.view.View;
public class FlipPageViewTransformer implements ViewPager.PageTransformer {
@Override
public void transformPage(View page, float position) {
float percentage = 1 - Math.abs(position);
page.setCameraDistance(12000);
setVisibility(page, position);
setTranslation(page);
package org.adw.drawables;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.FloatMath;
@Aracem
Aracem / build.gradle
Last active August 29, 2015 14:08 — forked from Takhion/build.gradle
Gradle Script to strip play services
apply from: 'strip_play_services.gradle'
@Aracem
Aracem / colors.xml
Last active August 29, 2015 14:10
RoundedActionButton
<?xml version="1.0" encoding="utf-8"?>
<!--
~ /*
~ * Copyright (c) 2014 Rushmore.fm All rights reserved.
~ * 1 1
~ * 101 101
~ * 100010001
~ * 10000000001
~ * 1000000000001
~ *
@Aracem
Aracem / nonempty_template
Created January 15, 2015 10:56
Android Studio Live Template to put check if a textview is not empty
/**
* Template to put the annoying !TextUtils.isEmpty(String)
*
* Declaration: Java - Expression
* Variables:
* $STRING$ expresion: completeSmart()
*
* Follow this instruction to add it to Android Studio
* http://dmytrodanylyk.com/pages/blog/templates.html
*/
@Aracem
Aracem / OttoBus
Created January 28, 2015 22:11
OttoBus that always send Bus event in the main thread
/**
* Upclose Otto library {@link com.squareup.otto.Bus}
*
*
* Created by Marcos Trujillo (U・x・U) on 28/07/14.
*/
public class OttoBus extends Bus {
private final Handler mainThread = new Handler(Looper.getMainLooper());
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)