Skip to content

Instantly share code, notes, and snippets.

Avatar
🕹️

Daichi Furiya wasabeef

🕹️
View GitHub Profile
View 0-how-to-use-maven-central-publish.sh
./gradlew clean buildRelease publish
@wasabeef
wasabeef / daily-ktlint.yml
Created Sep 3, 2019
Scheduled ktlint with Github Actions
View daily-ktlint.yml
# .github/workflows/daily-ktlint.yml
name: Android CI (Ktlint)
on:
schedule:
# Daily 7am (JST)
- cron: '00 22 * * *'
jobs:
View jacoco.gradle
apply plugin: "jacoco"
jacoco {
toolVersion = JACOCO_VERSION
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
View bintray-v1.gradle
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
View GLTextureView.java
package jp.wasabeef.sample;
import android.content.Context;
import android.graphics.SurfaceTexture;
import android.opengl.GLDebugHelper;
import android.util.AttributeSet;
import android.util.Log;
import android.view.TextureView;
import android.view.View;
import java.io.Writer;
@wasabeef
wasabeef / MockTransformer.java
Created Feb 27, 2015
Better Sliding ViewPager.PageTransformer
View MockTransformer.java
package jp.co.cyberagent.madrid.ui.adapter.transformer;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by Daichi Furiya on 2015/02/27.
*/
@wasabeef
wasabeef / RecyclerView.java
Created Sep 18, 2014
Original Copy RecyclerView
View RecyclerView.java
/*
* Copyright (C) 2013 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
@wasabeef
wasabeef / zxingQRCodeSample.java
Created Feb 3, 2014
Android - zxingQRCodeSample
View zxingQRCodeSample.java
import android.app.AlertDialog;
import android.content.Context;
import android.hardware.Camera;
import android.hardware.Camera.AutoFocusCallback;
import android.hardware.Camera.PreviewCallback;
import android.os.Build;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.SurfaceHolder;
@wasabeef
wasabeef / AnimatedGifEncoder.java
Last active Sep 1, 2020
Android - AnimatedGifEncoder
View AnimatedGifEncoder.java
import java.io.IOException;
import java.io.OutputStream;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Paint;
public class AnimatedGifEncoder {
protected int width; // image size
@wasabeef
wasabeef / ImageUtils.java
Created Feb 3, 2014
Android - ImageUtils
View ImageUtils.java
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.media.ExifInterface;
import java.io.File;
import java.io.IOException;
/**