(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 |
| package at.markushi.reveal; | |
| import android.app.Activity; | |
| import android.graphics.Color; | |
| import android.graphics.Point; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import at.markushi.ui.RevealColorView; |
| // These two need to be declared outside the try/catch | |
| // so that they can be closed in the finally block. | |
| HttpURLConnection urlConnection = null; | |
| BufferedReader reader = null; | |
| // Will contain the raw JSON response as a string. | |
| String forecastJsonStr = null; | |
| try { | |
| // Construct the URL for the OpenWeatherMap query |
(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.
| public class CircularProgressDrawable extends Drawable | |
| implements Animatable { | |
| private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator(); | |
| private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator(); | |
| private static final int ANGLE_ANIMATOR_DURATION = 2000; | |
| private static final int SWEEP_ANIMATOR_DURATION = 600; | |
| private static final int MIN_SWEEP_ANGLE = 30; | |
| private final RectF fBounds = new RectF(); |
| /* | |
| * Copyright 2014 Google Inc. | |
| * | |
| * 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 |
A list of Sketch plugins hosted at GitHub, in no particular order.
| private OnPageChangeListener mOnPageChangeListener = new OnPageChangeListener() { | |
| @Override | |
| public void onPageSelected(int position) { | |
| // Do whatever you wan't to do. It's up to you ... not me :) | |
| } | |
| @Override | |
| public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { | |
| // Do whatever you wan't to do. It's up to you ... not me :) | |
| } |
| #!/bin/bash | |
| # Script adb+ | |
| # Usage | |
| # You can run any command adb provides on all your currently connected devices | |
| # ./adb+ <command> is the equivalent of ./adb -s <serial number> <command> | |
| # | |
| # Examples | |
| # ./adb+ version | |
| # ./adb+ install apidemo.apk | |
| # ./adb+ uninstall com.example.android.apis |