Skip to content

Instantly share code, notes, and snippets.

View allco's full-sized avatar
🍭
can't stop

Alexander Skvortsov allco

🍭
can't stop
View GitHub Profile
@allco
allco / PicassoBitmapDownloader.java
Created March 25, 2016 12:06
A way of implementation of UrlConnectionDownloader
package com.asdevel.chatlib.utils;
import android.content.Context;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.asdevel.chatlib.BuildConfig;
import com.asdevel.chatlib.Constants;
import com.jakewharton.disklrucache.DiskLruCache;
@allco
allco / RightAlignLastLetterSpan.java
Created February 25, 2016 08:24
How to have in one row left and right aligned text simultaniously .
class RightAlignLastLetterSpan extends ReplacementSpan {
@SuppressWarnings("FieldCanBeLocal") private static boolean DEBUG = false;
private float textWidth = -1;
@Nullable private TextAppearanceSpan spanStyle;
@Nullable private String text;
@NonNull private TextView tv;
protected RightAlignLastLetterSpan(@NonNull TextView tv) {this.tv = tv;}