package com.monits.agilefant.listeners;

import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.TextView;

public abstract class OnDrawableClickListener implements OnTouchListener {

	private static final int FUZZ = 40;
	private final Drawable drawable;

	/**
	 * Constructor
	 * @param view The view
	 * @param position The item position
	 */
	public OnDrawableClickListener(final TextView view, final DrawablePosition position) {
		super();
		final Drawable[] drawables = view.getCompoundDrawables();
		this.drawable = drawables[position.ordinal()];
	}

	@Override
	public boolean onTouch(final View v, final MotionEvent event) {
		if (event.getAction() == MotionEvent.ACTION_DOWN && drawable != null) {
			final int x = (int) event.getX();
			final int y = (int) event.getY();
			final Rect bounds = drawable.getBounds();
			if (x >= (v.getRight() - bounds.width() - FUZZ) && x <= (v.getRight() - v.getPaddingRight() + FUZZ)
					&& y >= (v.getPaddingTop() - FUZZ) && y <= (v.getHeight() - v.getPaddingBottom()) + FUZZ) {

				return onDrawableClick(event);
			}
		}

		return false;
	}

	public abstract boolean onDrawableClick(MotionEvent event);

	public static enum DrawablePosition {
		LEFT, TOP, RIGHT, BOTTOM
	}
}
@@ -1225,16 +1225,157 @@
 se;%0A%09%7D%0A%0A
+%09/**%0A%09 * DrawableClick Event%0A%09 * @param event The event triggered%0A%09 * @return true if the callback consumed the event, false otherwise.%0A%09 */%0A
 %09public 

Fix OnDrawableClickListener lints