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)
# Begin build properties | |
# EOL UNIX | |
# 0.0 644 /system/build.prop | |
# | |
# Note: Some changes are Device and OS/ROM independent! | |
# Note2: Some settings are between | |
# performance and security <- I prefer last one | |
# | |
ro.build.id= ----- | |
ro.build.display.id= ----- |
/** | |
* 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 |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Add this as a debug manifest so the permissions won't be required by your production app --> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> | |
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | |
</manifest> |
#!/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" | |
// WidgetApi.java | |
public interface WidgetApi { | |
@GET("/widget/{:id}") | |
void getWidget(@Path("id") int id, Callback<Widget> callback); | |
} | |
// MockRetrofitClient.java | |
public class MockRetrofitClient implements Client { | |
private int statusCode = 200; |
#!/bin/sh | |
# License for any modification to the original (linked below): | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# Sebastiano Poggi 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 me a beer in return. | |
# ---------------------------------------------------------------------------- | |
# | |
# Based upon http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html |
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; |
package com.example.overlay; | |
public class Entry { | |
private final int imageResId; | |
private final String title; | |
public Entry( int imageResId, String title ) { | |
this.imageResId = imageResId; |