Record a video of your app
Developer options -> Check show touches
adb shell screenrecord /sdcard/video.mp4
adb pull /sdcard/video.mp4
package retrofit.converter; | |
import com.bluelinelabs.logansquare.LoganSquare; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.util.List; | |
import retrofit.converter.ConversionException; | |
import retrofit.converter.Converter; |
/* | |
* Copyright (C) 2014 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 |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 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 |
Centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.
A very good way is to separate gradle build files, defining something like:
root
--gradleScript
----dependencies.gradle
package kotterknife | |
import android.app.Activity | |
import android.app.Dialog | |
import android.app.DialogFragment | |
import android.app.Fragment | |
import android.arch.lifecycle.Lifecycle | |
import android.arch.lifecycle.LifecycleObserver | |
import android.arch.lifecycle.LifecycleOwner | |
import android.arch.lifecycle.OnLifecycleEvent |
class SpeedDialClickListener( | |
@ColorInt private val tint: Int = Color.BLUE, | |
private val items: List<Pair<CharSequence?, Drawable>>, | |
private val runGuard: (View) -> Boolean, | |
private val dismissListener: (Int?) -> Unit | |
) : View.OnClickListener { | |
override fun onClick(button: View?) { | |
if (button !is MaterialButton || !runGuard(button)) return |