Skip to content

Instantly share code, notes, and snippets.

View hleinone's full-sized avatar

Hannu Leinonen hleinone

View GitHub Profile
@liberorignanese
liberorignanese / MarginSpan.java
Last active January 12, 2024 18:05
Android TextInputLayout with credit card mask
package com.liberorignanese.android.gist;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.text.style.ReplacementSpan;
/**
* Created by Libero Rignanese.
*/
@gabrielemariotti
gabrielemariotti / Activity.java
Last active November 27, 2022 09:27
Floating Action Button (requires Android-L preview)
public class MainActivity 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();
@pboos
pboos / annotation-processor-build.gradle
Last active August 7, 2020 06:38
Gradle stuff for Android
configurations {
apt
}
dependencies {
compile 'com.squareup.dagger:dagger:1.1.0'
apt 'com.squareup.dagger:dagger-compiler:1.1.0'
}
android.applicationVariants.all { variant ->
@jush
jush / build.gradle
Last active December 18, 2015 07:19 — forked from jpeddicord/build.gradle
// additional required configuration to hook into the build script
android {
signingConfigs {
release {
// specify signing properties on the command line
if (project.hasProperty('keyStore')) {
println 'Generating a signed package.'
storeFile file(keyStore)
storePassword storePass
keyAlias alias