Skip to content

Instantly share code, notes, and snippets.

package com.bejibx.android.testdataprocessor
import arrow.core.Either
import arrow.fx.rx2.ForSingleK
import arrow.fx.rx2.SingleK
import arrow.fx.rx2.extensions.singlek.functor.functor
import arrow.fx.rx2.extensions.singlek.monad.monad
import arrow.fx.rx2.k
import arrow.fx.rx2.value
import arrow.mtl.EitherT
@bejibx
bejibx / TextViewUtils.java
Created October 7, 2016 19:33
Separate thousands in android text view with spans
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.NonNull;
import android.text.Editable;
import android.text.Spanned;
import android.text.TextWatcher;
import android.text.style.ReplacementSpan;
import android.widget.TextView;
import java.text.DecimalFormat;
@bejibx
bejibx / CancellablePermissionRequestActivity.java
Last active August 10, 2016 13:59
Cancel runtime permission request in Android
import android.Manifest;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.NotificationCompat;