(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 2014 Chris Banes | |
* | |
* 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 |
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |
package com.liberorignanese.android.gist; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.text.style.ReplacementSpan; | |
/** | |
* Created by Libero Rignanese. | |
*/ |
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" |
/* | |
* Copyright 2014 Chris Banes | |
* | |
* 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 |
public class HelperUtil { | |
private final HelperUtilImpl mImpl; | |
public HelperUtil (Context context) { | |
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) { | |
mImpl = new HelperUtilImplL(context); | |
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { | |
mImpl = new HelperUtilImplKK(context); |
public class HelperUtil { | |
public static HelperUtilBase getInstance(Context context) { | |
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) { | |
return new HelperUtilL(context); | |
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { | |
return new HelperUtilKK(context); | |
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { | |
return new HelperUtilJB(context); |