This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ColorGenerator { | |
public static List<Color> generate(int colors, int skip) { | |
final int lastindex = colors + skip; | |
return new Points(colors + skip).asList().subList(skip, lastindex); | |
} | |
// RYB color space | |
private static class RYB { | |
private static final double[] White = { 1, 1, 1 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @see https://github.com/evant/gradle-retrolambda/issues/109 | |
afterEvaluate { | |
// library projects | |
// def variants = project.android.libraryVariants + project.android.testVariants | |
// application projects | |
def variants = project.android.applicationVariants + project.android.testVariants | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 Johannes Homeier | |
* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#sudo apt-get install libxml2-utils | |
GetGoogleSourceFile () { | |
[ "-$1" == "-" ] && return 1 | |
curl -s --compressed -G -d "format=text" --url "$GOOGLE_SOURCE_URL/${3:-platform/frameworks/base}/${2:-+/master}/$1" | base64 -d | |
} | |
GetRepositoryXmlURL () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
//by Ralph Barbagallo | |
//www.flarb.com | |
//www.ralphbarbagallo.com | |
//@flarb | |
public class VRInputModule : BaseInputModule { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using UnityEditor; | |
using System.IO; | |
public class SDKSwap : EditorWindow { | |
static string _cardboardPath; | |
static string _OVRPath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://matsuhilog.blogspot.jp/2013/05/performance-analytics-in-android.html | |
// https://code.google.com/p/codenameone/issues/detail?id=294 | |
public static String getDefaultUserAgent(Context context) { | |
String ua; | |
if (Build.VERSION.SDK_INT >= 17) { | |
ua = Util.getDefaultUserAgent(context); | |
} else if (Build.VERSION.SDK_INT >= 16) { | |
ua = Util.getUserAgent(context); | |
} else { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val uiModule = module(definition = { | |
factory { get<NavHostFragment>().navController } | |
factory { ContextHelper.getAppCompatActivity()!!.supportFragmentManager.findFragmentById(R.id.navHost) as NavHostFragment } | |
}) | |
inline fun <reified T : Any> Any.inject( | |
name: String = "", | |
scope: Scope? = null, | |
noinline parameters: ParameterDefinition = emptyParameterDefinition() | |
) = lazy { getKoin().koinContext.get<T>(name, scope, parameters) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.animation.Animator; | |
import android.animation.TimeInterpolator; | |
import android.annotation.TargetApi; | |
import android.graphics.Color; | |
import android.os.Build; | |
import android.support.annotation.NonNull; | |
import android.util.Log; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.ViewAnimationUtils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseFragment extends Fragment { | |
private boolean fragmentResume=false; | |
private boolean fragmentVisible=false; | |
private boolean fragmentOnCreated=false; | |
@Override | |
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); |
OlderNewer