Code example for AbsoluteLayout

Methods: addViewremoveView

0
				flag_move=false;
				myLastTouch_x=event.getX();
				myLastTouch_y=event.getY();
				pointerId=event.getPointerId(0);
				 
				myLayout.removeView(this);
				myLayout.addView(this);
				break; 
			} 
			case MotionEvent.ACTION_MOVE:
			{ 
				Log.d(TAG +"(Value drag)","Action move");
				final int act_p=event.getPointerId(pointerId);
				final float xc= event.getX();
				final float yc= event.getY();
				final float dx= (xc-myLastTouch_x);
				float dy= (yc-myLastTouch_y);
				if (((float)Math.sqrt(dx*dx+dy*dy))>PXTRESH)
				{ 
					flag_move=true;
Experience pair programming with AI  Get Codota for Java