- Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
- Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
- A fairly complete shortcut list can be found here.
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
class TaskTimerListener implements TaskExecutionListener { | |
private Clock clock | |
@Override | |
void beforeExecute(Task task) { | |
clock = new org.gradle.util.Clock() | |
} | |
@Override |
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
task deployApks(type:Copy) { | |
description = "Copies APKs and Proguard mappings to the deploy directory" | |
def appName = "posture"; | |
def versionDir = android.defaultConfig.versionName+"_"+android.defaultConfig.versionCode; | |
println("Copies APK and Proguard to " + versionDir) | |
from 'build/outputs/mapping/release/' | |
include '**/mapping.txt' | |
into '../.admin/deploy/' + versionDir |
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
UseAge: | |
1:create providedJar dir at subProject | |
2:use:providAAR 'xxxx' in subproject | |
Code in root build.gradle: | |
buildscript { | |
repositories { | |
mavenLocal() |
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.app.Activity; | |
import android.app.Application; | |
import android.content.Context; | |
import android.content.ContextWrapper; | |
import android.os.Bundle; | |
import android.os.Looper; | |
import android.os.MessageQueue; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.ViewTreeObserver; |
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
// Application | |
apply plugin: 'android' | |
repositories { | |
mavenCentral() | |
} | |
android { | |
compileSdkVersion rootProject.ext.compileSdkVersion | |
buildToolsVersion rootProject.ext.buildToolsVersion |
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 okhttp3.ResponseBody; | |
import okhttp3.mockwebserver.MockResponse; | |
import okhttp3.mockwebserver.MockWebServer; | |
import okhttp3.mockwebserver.RecordedRequest; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import retrofit2.Call; | |
import retrofit2.Response; | |
import retrofit2.Retrofit; | |
import retrofit2.http.GET; |
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
#build.gradle | |
# | |
# compile 'io.reactivex:rxandroid:1.0.1' | |
# compile 'io.reactivex:rxjava:1.0.14' | |
# compile 'io.reactivex:rxjava-math:1.0.0' | |
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0' | |
# rxjava | |
-keep class rx.schedulers.Schedulers { | |
public static <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
import android.media.MediaRecorder; | |
import android.support.annotation.NonNull; | |
import com.f2prateek.rx.android.schedulers.AndroidSchedulers; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.concurrent.TimeUnit; | |
import rx.Observable; | |
import rx.subscriptions.Subscriptions; | |
public class RxMediaRecorder { |
NewerOlder