Android View.OnTouchListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android View.OnTouchListener class.

This code example shows how to use the following methods:onTouch
					return true; 
				} 
			} 
		} 
		if (l != null) {
			return l.onTouch(v, event);
		} 
		return false; 
	} 
 
	@Override 
	public void onFocusChange(View v, boolean hasFocus) {
		if (hasFocus) {
			setClearIconVisible(isNotEmpty(getText()));
		} else { 
			setClearIconVisible(false); 
		} 
		if (f != null) {
			f.onFocusChange(v, hasFocus);
		} 
6
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onTouch
        } else if (touchFinished(event)) {
            mPanZoomController.preventedTouchFinished();
        } 
 
        // notify gecko of the event 
        mOnTouchListener.onTouch(mView, event);
 
        return true; 
    } 
 
    /** 
     * This function is how gecko sends us a default-prevented notification. It is called 
     * once gecko knows definitively whether the block of events has had preventDefault 
     * called on it (either on the initial down event that starts the block, or on 
     * the first event following that down event). 
     * 
     * This function MUST be called on the UI thread. 
     */ 
    public void handleEventListenerAction(boolean allowDefaultAction) {
        if (mProcessingBalance > 0) {
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onTouch
		} 
 
		mBeforeX = x;
		mBeforeY = y;
		if (mExtraEventListener != null) {
			mExtraEventListener.onTouch(v, event);
		} 
		return true; 
	} 
} 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onTouch
				isUserEventExpire = false;
			mIsMoving = false;
			break; 
		} 
		if(!mIsMoving && isUserEventExpire && mUserOnTouchListener != null)
			mUserOnTouchListener.onTouch(mRootView, event);
 
		return true; 
	} 
 
	private void move(int x, int y){
		if(!mMoveEnable)
			return; 
 
		if(mPreMoveX == -1 || mPreMoveY == -1){
			mPreMoveX = x;
			mPreMoveY = y;
			mPreFirstPointX = x;
			mPreFirstPointY = y;
			return; 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onTouch
			lp.y = (y < (oh - vh) >> 1) ? y * h / oh : (y * h + (h - oh) * vh) / oh;
			Log.d("ORC", String.format("(%d, %d), (%d, %d), (%d, %d)", lp.x, lp.y, vw, vh, w, h));
			 
			this.orientation = orientation;
			this.updateViewPosition();
			this.onTouchListener.onTouch(this.view, MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_CANCEL, 0, 0, 0));
		} 
	} 
} 
3
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onTouch
			isPressed = true;
			((ImageView)buttonView).setImageDrawable(highlight_drawable);
			 
			if (mXtraListener != null)
			{ 
				mXtraListener.onTouch(buttonView, event);
			} 
			 
			break; 
		case MotionEvent.ACTION_MOVE:
		case MotionEvent.ACTION_CANCEL:
		case MotionEvent.ACTION_UP:
			if ( isPressed)
			{ 
				((ImageView)buttonView).setImageDrawable(normal_drawable);
				isPressed = false;
				 
				if (mXtraListener != null)
				{ 
					mXtraListener.onTouch(buttonView, event);
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:onTouch
			 
			// determine if it was a click 
			if(xTouch < img.getWidth() && yTouch < img.getHeight() 
					&& transparency > 100)
			{ 
				listener.onTouch(v, event);	
			} 
		} 
		 
		return true; 
	} 
	 
	public void setOnTouchListener(OnTouchListener l)
	{ 
		view.setOnTouchListener(this);
		listener = l;
	} 
	 
	public float getWidth() 
	{ 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java

Related Android View.OnTouchListener Questions & Answers:

Other Android View.OnTouchListener Examples

30:	  }
31:	
32:	  private final class MyTouchListener implements OnTouchListener {
33:	    public boolean onTouch(View view, MotionEvent motionEvent) {
34:	      if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {

Read More

See Code Examples for Android View.OnTouchListener Methods: