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
@Aracem
Aracem / CircleTransform.java
Created February 10, 2014 10:10 — forked from julianshen/CircleTransform.java
Picasso Transformation that transforms the image in a Circle
package com.example.picassodemo;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
/**
@Aracem
Aracem / FloatingActionActivity.java
Created July 3, 2014 07:14 — forked from gabrielemariotti/Activity.java
Basic classes to make a typical Material Floating Action Button
public class FloatingActionActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layoutfab);
//Outline
int size = getResources().getDimensionPixelSize(R.dimen.fab_size);
Outline outline = new Outline();
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:orientation="vertical"
android:windowMinWidthMajor="@android:dimen/dialog_min_width_major">
<LinearLayout
@Aracem
Aracem / LogTag
Created July 21, 2014 09:11
Add a tag to DDMS Android Log to see all the entries with whatever-string-whatever
^.*rushmore.*$
@Aracem
Aracem / openActivity.java
Created July 21, 2014 09:28
Open an Activity growing from a View
if (SupportVersion.JellyBean()) {
ActivityOptions options = ActivityOptions.makeScaleUpAnimation(view, 0,
0, view.getWidth(), view.getHeight());
startActivity(coverFlowIntent, options.toBundle());
} else {
startActivity(coverFlowIntent);
}
@Aracem
Aracem / GsonTemplate.java
Last active August 29, 2015 14:04
Android Studio TemplateTemplate to implement Gson serialization and deserialization in a bean
/**
* Template to implement Gson serialization and deserialization in a bean
*
* Declaration: Java - Declaration
* Variables:
* $TYPE$ expresion: className() defaultValue: Object
*
* Follow this instruction to add it to Android Studio
* http://dmytrodanylyk.com/pages/blog/templates.html
*/
@Aracem
Aracem / BeanListOptionsTemplate.java
Last active August 29, 2015 14:04
An Android Studio template to generate utils methods for Beans that contains a List of objects
/*
* Declaration: Java - Declaration
* Variables:
* $TYPE$ expresion: arrayValue() defaultValue: listField
* $OBJECT$ expresion:className() defaultValue: Object
*
* Follow this instruction to add it to Android Studio
* http://dmytrodanylyk.com/pages/blog/templates.html
*/
@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
@Aracem
Aracem / Alias AndroidManifest.xml
Last active August 29, 2015 14:06 — forked from cdsap/AndroidManifest.xml
Use alias in the Android Manifest. Currently only available in the flavours, not in the buildTypes
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapplication" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
/*
* 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()
}