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
########--------Retrofit + RxJava--------######### | |
-dontwarn retrofit.** | |
-keep class retrofit.** { *; } | |
-dontwarn sun.misc.Unsafe | |
-dontwarn com.octo.android.robospice.retrofit.RetrofitJackson** | |
-dontwarn retrofit.appengine.UrlFetchClient | |
-keepattributes Signature | |
-keepattributes Exceptions | |
-keepclasseswithmembers class * { | |
@retrofit.http.* <methods>; |
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://stackoverflow.com/questions/4605527/converting-pixels-to-dp | |
//The above method results accurate method compared to below methods | |
//http://stackoverflow.com/questions/8309354/formula-px-to-dp-dp-to-px-android | |
//http://stackoverflow.com/questions/13751080/converting-pixels-to-dpi-for-mdpi-and-hdpi-screens | |
public static float convertPixelsToDp(float px){ | |
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
float dp = px / (metrics.densityDpi / 160f); | |
return Math.round(dp); |
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
/usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW MBE:style=Light | |
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai CN:style=Book | |
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai HK:style=Book | |
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai TW:style=Book | |
/usr/share/fonts/truetype/arphic-bkai00mp/bkai00mp.ttf: AR PL KaitiM Big5,文鼎PL中楷:style=Regular | |
/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf: AR PL KaitiM GB,文鼎PL简中楷:style=Regular | |
/usr/share/fonts/truetype/arphic-gbsn00lp/gbsn00lp.ttf: AR PL SungtiL GB,文鼎PL简报宋:style=Regular | |
/usr/share/fonts/truetype/arphic-bsmi00lp/bsmi00lp.ttf: AR PL Mingti2L Big5,文鼎PL細上海宋:style=Reguler,Regular | |
/usr/share/fonts/truetype/arphic/ukai.ttc: AR PL UKai TW MBE:style=Book | |
/usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW:style=Light |
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 ProjectUtils { | |
/*** | |
* Force MediaScanner to update its media database for recently added files. | |
* @param context the calling context. | |
* @param filePathForScan File path which will request the media scanner to rescan and add it | |
* to the media database. | |
*/ | |
public static void forceUpdateMediaScanner(Context context, String filePathForScan) { | |
if (context != null) { | |
new SingleMediaScanner(context, new File(filePathForScan)); |
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
@file:Suppress("PackageDirectoryMismatch") // root package looks great when importing, ie. `import exhaustive` | |
/** | |
* Allows requiring an exhaustive mapping in a `when` block when used with the [rangeTo] operator. | |
* @sample [exhaustive_when_example] | |
*/ | |
@Suppress("ClassName") // lowercase because it should look like a keyword | |
object exhaustive { |
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 2017 Google Inc. | |
* | |
* 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
android.applicationVariants.all { variant -> | |
if (variant.install != null) { | |
variant.install.doLast { | |
exec { | |
commandLine "afplay", "your_sound.mp3" | |
} | |
} | |
} | |
} |
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 2012 Pierre-Yves Ricau | |
// | |
// 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 | |
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentManager; | |
#parse("File Header.java") | |
public class ${NAME} extends Fragment { | |
private static final String FRAG_TAG = ${NAME}.class.getCanonicalName(); |
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
-ignorewarnings | |
-keep public class * extends android.os.Binder | |
-keepclassmembers enum * { | |
**[] $VALUES; | |
public *; | |
} | |
# v7 | |
-keep public class android.support.v7.widget.** { *; } | |
-keep public class android.support.v7.internal.widget.** { *; } |