Code example for Gallery

Methods: getHeight

0
	@Override 
	public boolean onTouchEvent(MotionEvent event) {
		// TODO 自動生成されたメソッド・スタブ 
		//return super.onTouchEvent(event); 
 
		long offsetY = imgGallery.getHeight() + textView.getHeight();
		if(event.getY() < offsetY)return false;
 
		//ref http://techbooster.jpn.org/andriod/application/715/ 
		Log.d("TouchEvent", "X:" + event.getX() + ",Y:" + event.getY());
 
	    switch (event.getAction()) {
	    case MotionEvent.ACTION_DOWN:
	        Log.d("TouchEvent", "getAction()" + "ACTION_DOWN");
	        preTouchX = event.getX();
	        preTouchY = event.getY();
	        break; 
 
	    case MotionEvent.ACTION_UP:
	    	Log.d("TouchEvent", "getAction()" + "ACTION_UP");