This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.text.SpannableStringBuilder; | |
import java.util.ArrayDeque; | |
import java.util.Deque; | |
import static android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE; | |
/** A {@link SpannableStringBuilder} wrapper whose API doesn't make me want to stab my eyes out. */ | |
public class Truss { | |
private final SpannableStringBuilder builder; | |
private final Deque<Span> stack; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#build.gradle | |
# | |
# compile 'io.reactivex:rxandroid:1.0.1' | |
# compile 'io.reactivex:rxjava:1.0.14' | |
# compile 'io.reactivex:rxjava-math:1.0.0' | |
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0' | |
# rxjava | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.text.SpannableStringBuilder | |
import android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE | |
import java.util.* | |
/** A [SpannableStringBuilder] wrapper whose API doesn't make me want to stab my eyes out. */ | |
class KTruss { | |
private val builder: SpannableStringBuilder = SpannableStringBuilder() | |
private val stack: Deque<Span> = ArrayDeque<Span>() | |
fun append(string: String): KTruss { |