View Pager.java
public class Pager<I, O> {
private static final Observable FINISH_SEQUENCE = Observable.never();
private PublishSubject<Observable<I>> pages;
private Observable<I> nextPage = finish();
private Subscription subscription = Subscriptions.empty();
private final PagingFunction<I> pagingFunction;
private final Func1<I, O> pageTransformer;
View strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string formatted="false" name="html_link"><![CDATA[<a href=\"%s\">%s</a>]]></string>
</resources>
View Incrementer.java
public class Incrementer {
public static int[] increment(int[] input) {
int index = input.length -1;
while(++input[index] % 10 == 0) {
input[index] = input[index] % 10;
if(index == 0) {
int[] result = new int[input.length + 1];
result[0] = 1;
return result;
}
View gist:9250638
/*
* Copyright 2012 Google Inc. All Rights Reserved.
*
* 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
View gist:7168528
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Target;
public class CancelableTarget implements Target {
protected Target mTarget;
private boolean mIsCancelled;