Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
| package com.pixite.pigment.testing | |
| import android.app.Activity | |
| import android.app.Application | |
| import android.content.Context | |
| import android.content.Intent | |
| import android.os.Bundle | |
| import androidx.fragment.app.Fragment | |
| import androidx.fragment.app.FragmentActivity | |
| import androidx.fragment.app.FragmentManager |
| import android.app.Activity; | |
| import android.app.Instrumentation; | |
| import android.app.KeyguardManager; | |
| import android.app.KeyguardManager.KeyguardLock; | |
| import android.content.Context; | |
| import android.content.pm.PackageManager; | |
| import android.os.IBinder; | |
| import android.os.PowerManager; | |
| import android.os.PowerManager.WakeLock; | |
| import android.support.test.InstrumentationRegistry; |
| /* | |
| * Copyright (C) 2015 Jake Wharton | |
| * | |
| * 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 |
| #!/bin/sh | |
| set -e | |
| if [ -z "$1" ]; then | |
| shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4 | |
| else | |
| shot_path="$*" | |
| fi |
| /** | |
| * @param interval The base interval to start backing off from. The function is: attemptNum^2 * intervalTime | |
| * @param units The units for interval | |
| * @param retryAttempts The max number of attempts to retry this task or -1 to try MAX_INT times, | |
| */ | |
| public static <T> Observable.Transformer<T, T> backoff(final long interval, final TimeUnit units, final int retryAttempts) { | |
| return new Observable.Transformer<T, T>() { | |
| @Override | |
| public Observable<T> call(final Observable<T> observable) { | |
| return observable.retryWhen( |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
| public class AccountAuthenticator extends AbstractAccountAuthenticator { | |
| private final Context context; | |
| @Inject @ClientId String clientId; | |
| @Inject @ClientSecret String clientSecret; | |
| @Inject ApiService apiService; | |
| public AccountAuthenticator(Context context) { | |
| super(context); |
| Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. To use the support version of these attributes, remove the android namespace. For instance, "android:colorControlNormal" becomes "colorControlNormal". These attributes will be propagated to their corresponding attributes within the android namespace for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
| All Clickable Views: | |
| ----------- | |
| * ripple effect (Lollipop only) -- "colorControlHighlight" | |
| Status Bar: | |
| ------------ | |
| * background (Lollipop only) - "colorPrimaryDark" |
| // You can place it in the root build.gradle | |
| allprojects { | |
| tasks.withType(JavaForkOptions) { | |
| // Forked processes like GradleWorkerMain for tests won't steal focus! | |
| jvmArgs '-Djava.awt.headless=true' | |
| } | |
| } |
| #!/bin/sh | |
| # License for any modification to the original (linked below): | |
| # ---------------------------------------------------------------------------- | |
| # "THE BEER-WARE LICENSE" (Revision 42): | |
| # Sebastiano Poggi wrote this file. As long as you retain this notice you | |
| # can do whatever you want with this stuff. If we meet some day, and you think | |
| # this stuff is worth it, you can buy me a beer in return. | |
| # ---------------------------------------------------------------------------- | |
| # | |
| # Based upon http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html |