Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Roman drstranges

🎯
Focusing
Block or report user

Report or block drstranges

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View input.txt
4
15.01. 17:00
16.01. 12:00
11.02. 14:00
30.01. 10:00
View SharedPreferenceLiveData
import android.content.SharedPreferences
import android.content.SharedPreferences.OnSharedPreferenceChangeListener
import androidx.lifecycle.LiveData
class SharedPreferenceLiveData<T>(
val prefs: SharedPreferences,
val key: String,
val defaultValue: T,
val valueProvider: (prefs: SharedPreferences, key: String, defValue: T?) -> T?
) : LiveData<T>() {
View HashtagEditText
public class HashtagEditText extends EditText implements TextWatcher {
private boolean isAddedListener = false;
public HashtagEditText(Context context) {
super(context);
registerListener();
}
public HashtagEditText(Context context, AttributeSet attrs) {
@drstranges
drstranges / CustomTextInputLayout.java
Last active Sep 4, 2019
TextInputLayout temporary workaround for helper text showing
View CustomTextInputLayout.java
package com.example.d_rom.supportdesigndemo.widget;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.support.design.widget.TextInputLayout;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorListenerAdapter;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.text.TextUtils;
You can’t perform that action at this time.