(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.
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 |
fun View.visible() { | |
visibility = View.VISIBLE | |
} | |
fun View.invisible() { | |
visibility = View.INVISIBLE | |
} | |
fun View.gone() { | |
visibility = View.GONE |
#!/bin/bash | |
# Prompts for device to use from adb devices -l first; inserts -s parameter. | |
# No sanitizing, error checking or warranties! | |
# Use like | |
# $choose_device adb shell | |
DEVICES=`adb devices -l | sed 1d` | |
PS3="Choose device or Ctrl+C to quit: " |
@SuppressWarnings({ "WeakerAccess", "unused" }) public class SQLQueryBuilder { | |
private static final String STATEMENT_SELECT = "SELECT"; | |
private static final String STATEMENT_DISTINCT_SELECT = "SELECT DISTINCT"; | |
private static final String STATEMENT_UPDATE = "UPDATE"; | |
private static final String STATEMENT_INSERT_INTO = "INSERT INTO"; | |
private static final String STATEMENT_DELETE = "DELETE FROM"; | |
private static final String WHERE = "WHERE"; | |
private static final String FROM = "FROM"; |
import android.content.Context; | |
import android.support.v4.view.ViewPager; | |
import android.util.AttributeSet; | |
import android.view.Gravity; | |
import android.view.MotionEvent; | |
import android.view.View; | |
/** | |
* Created by Shyish on 11/10/2015. | |
*/ |
/* | |
* 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 |
(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.
import com.puppycrawl.tools.checkstyle.api.*; | |
public class AntiHungarianCheck extends Check { | |
private static final String CATCH_MSG = "Hungarian notation belongs in the 90's. " + | |
"Don't prefix member variables with 'm'. " + | |
"Use your IDE's shiny colors. Culprit was: "; | |
private final HungarianNotationMemberDetector detector = new HungarianNotationMemberDetector(); |