Skip to content

Instantly share code, notes, and snippets.

View TheFinestArtist's full-sized avatar
🔥
Reigniting

Leonardo Kim TheFinestArtist

🔥
Reigniting
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright 2013 The Finest Artist
*
* 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
@TheFinestArtist
TheFinestArtist / ZoomLayout.java
Last active February 22, 2024 10:46 — forked from anorth/ZoomLayout.java
Pinch-zoomable Android frame layout
package au.id.alexn;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.FrameLayout;
@TheFinestArtist
TheFinestArtist / LanguageDetector.java
Created December 27, 2014 13:40
Detect whether current language is Korean, Japanese or Others
/**
* Created by TheFinestArtist on 2014. 9. 2..
*/
public class LanguageDetector {
public enum Language {Korean, Japanese, English}
public static boolean isEnglish(CharSequence charSequence) {
boolean isEnglish = true;
for (char c : charSequence.toString().toCharArray()) {
/**
* Copyright 2013 The Finest Artist
*
* 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
@TheFinestArtist
TheFinestArtist / Snackbars.java
Last active September 4, 2022 10:15
Wrapper class to customise android.support.design snack bar!
/**
* Snackbars
*
* @author The Finest Artist
*/
public class Snackbars {
private Snackbars() {
}
/**
* Copyright 2013 Bo Wang
*
* 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
@TheFinestArtist
TheFinestArtist / colors_grey.xml
Last active June 13, 2019 23:33
Grey color code for Android
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright 2013 The Finest Artist
*
* 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
@TheFinestArtist
TheFinestArtist / KeyboardUtil.java
Created September 24, 2015 11:07
KeyboardUtil.java
/*
* Copyright 2015 Mike Penz All rights reserved.
*
* 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
/*
* Author: Felipe Herranz (felhr85@gmail.com)
* Contributors:Francesco Verheye (verheye.francesco@gmail.com)
* Israel Dominguez (dominguez.israel@gmail.com)
*/
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;
@TheFinestArtist
TheFinestArtist / AndroidBug5497Workaround.java
Created September 24, 2015 11:08
AndroidBug5497Workaround.java
public class AndroidBug5497Workaround {
// For more information, see https://code.google.com/p/android/issues/detail?id=5497
// To use this class, simply invoke assistActivity() on an Activity that already has its content view set.
public static void assistActivity (Activity activity) {
new AndroidBug5497Workaround(activity);
}
private View mChildOfContent;