(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* | |
* 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"?> | |
<resources> | |
<color name="red_50">#fde0dc</color> | |
<color name="red_100">#f9bdbb</color> | |
<color name="red_200">#f69988</color> | |
<color name="red_300">#f36c60</color> | |
<color name="red_400">#e84e40</color> | |
<color name="red_500">#e51c23</color> | |
<color name="red_600">#dd191d</color> | |
<color name="red_700">#d01716</color> |
package com.cafesalam.experiments.app.ui; | |
import org.lucasr.probe.Interceptor; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.graphics.Point; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.view.ViewParent; |
package com.cafesalam.experiments.app.ui; | |
import org.lucasr.probe.Interceptor; | |
import android.content.Context; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.WeakHashMap; |
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_enabled="false" | |
android:color="@color/flat_disabled_text"/> | |
<item android:color="@color/flat_normal_text"/> | |
</selector> |
<?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 |
import android.content.Intent; | |
import android.support.annotation.NonNull; | |
import java.io.Serializable; | |
import java.util.Map; | |
/** | |
* Provides a way to wrap a serializable {@link Map} in order to preserve its class | |
* during serialization inside an {@link Intent}, otherwise it would be "flattened" | |
* in a {@link android.os.Parcel} and unparceled as a {@link java.util.HashMap}. |
routes
– an array of route objects
request
- configuration of a request.
response
- configuration of the response.
resourcePath
- relative path of the resource to serve, if the request was matched.contentType
- optional an override for the resource content type. By default it's automatically deduced from the file MIME type.import org.junit.rules.TestRule; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.Statement; | |
/** Got flaky tests? Shampoo them away. */ | |
public final class ShampooRule implements TestRule { | |
private final int iterations; | |
public ShampooRule(int iterations) { | |
if (iterations < 1) throw new IllegalArgumentException("iterations < 1: " + iterations); |