Instead of the verbose setOnClickListener
:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));
Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
Find the latest here actually: https://github.com/jamesmontemagno/steps-set-android-manifest-versions |
#!/bin/bash | |
MACHINE=$1 | |
# Assume executing in the directory of the Vagrant file | |
# This command will prompt for the Vagrant user's password, it's usually "vagrant" | |
ssh-keygen -y -f .vagrant/machines/$MACHINE/virtualbox/private_key | \ | |
vagrant ssh $MACHIME -c "mkdir .ssh; tee -a .ssh/authorized_keys; chmod 0600 .ssh/authorized_keys" | |
#!/bin/sh | |
exec git branch -r | cut -d' ' -f3 | xargs git show --pretty='%Cgreen%ai %Creset%h %an %d' -s | sed '/^$/d' | sort | uniq |
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(); |
// in your root gradle file: | |
buildscript { | |
repositories { | |
jcenter() | |
google() | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1" | |
} |
package com.pixite.fragment.widget; | |
import android.content.res.Resources; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.Drawable.Callback; | |
import android.view.Gravity; |
/** | |
* Checkstyle tasks | |
* Usage: | |
* - place this file under root dir of your project at /gradle directory | |
* - apply script from your gradle file: | |
* apply from : "{rootDir}/gradle/checkstyle.gradle" | |
* | |
* To configure checkstyle use configs at: | |
* "{rootDir}/config/checkstyle/checkstyle.xml" - for main projects | |
* "{rootDir}/config/checkstyle/checkstyle-test.xml" - for tests |
#!/usr/bin/python | |
# License for any modification to the original (linked below): | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# Sebastiano Poggi and Daniele Conti 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 us a beer in return. | |
import argparse, sys, subprocess, tempfile |
public class CustomMatchers { | |
public static Matcher<View> withBackground(final int resourceId) { | |
return new TypeSafeMatcher<View>() { | |
@Override | |
public boolean matchesSafely(View view) { | |
return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
} | |
@Override |