Skip to content

Instantly share code, notes, and snippets.

View wasabeef's full-sized avatar
🕹️

Daichi Furiya wasabeef

🕹️
View GitHub Profile
@wasabeef
wasabeef / 0-how-to-use-maven-central-publish.sh
Last active July 7, 2021 04:59
maven-central-v1.gradle
./gradlew clean buildRelease publish
@wasabeef
wasabeef / daily-ktlint.yml
Created September 3, 2019 07:18
Scheduled ktlint with Github Actions
# .github/workflows/daily-ktlint.yml
name: Android CI (Ktlint)
on:
schedule:
# Daily 7am (JST)
- cron: '00 22 * * *'
jobs:
apply plugin: "jacoco"
jacoco {
toolVersion = JACOCO_VERSION
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
@wasabeef
wasabeef / bintray-v1.gradle
Last active February 10, 2021 05:47
bintray
apply plugin: 'com.jfrog.bintray'
version = libraryVersion
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
@wasabeef
wasabeef / GLTextureView.java
Last active September 11, 2024 09:41
GLTextureView
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 February 27, 2015 14:17
Better Sliding ViewPager.PageTransformer
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 September 18, 2014 06:30
Original Copy RecyclerView
/*
* 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 February 3, 2014 15:09
Android - zxingQRCodeSample
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 July 8, 2023 10:04
Android - AnimatedGifEncoder
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 February 3, 2014 14:53
Android - ImageUtils
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;
/**