Skip to content

Instantly share code, notes, and snippets.

@inlacou
inlacou / MyActivity.java
Created May 22, 2018 — forked from Sottti/MyActivity.java
Handles clicks on a EditText right drawable
View MyActivity.java
[...]
mEditText.setOnTouchListener(
new OnEditTextRightDrawableTouchListener(mEditText) {
@Override
public void OnDrawableClick() {
// The right drawable was clicked. Your action goes here.
}
});
[...]
@inlacou
inlacou / LimitedEditText.java
Created Apr 12, 2016
Limited length editText
View LimitedEditText.java
package com.byvapps.wikiopps.ui.views;
import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.util.Log;
You can’t perform that action at this time.