Hi I want to implement my own Button Listener Interface on Android. It's between OnClickListener and OnLongClickListener Interfaces.
I create OnMyTouchListener Interface :
public interface OnMyTouchListener {
public static int duration = 1;
public void onMyTouch(View view);
}
And I extend my button :
public class Button3D extends Button {
public Button3D(Context context, AttributeSet attrs) {
super(context, attrs);
}
public void addMyTouchListener(OnMyTouchListener onMyTouchListener){
// ???
}
}
I want to call onMyTouch method when touch duration is more than 1sec and less than 2sec but could not find the solution.