how to moving bitmap one by one
<p>this is my full code,,,,</p>

<p>anyone can help me,,,</p>

<pre><code>public class MainActivity extends Activity {

@Override
    public void onCreate(Bundle savedInstanceState) 
    {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
     getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
             WindowManager.LayoutParams.FLAG_FULLSCREEN); 
    setContentView(new Panel(this));

    }
}


class Panel extends SurfaceView implements SurfaceHolder.Callback {


         private Bitmap[] mBitmap;
        private ViewThread mThread;
        public Panel(Context context) {
            super(context);
             mBitmap = new Bitmap[4];
                mBitmap[0] = BitmapFactory.decodeResource(getResources(), R.drawable.x);
                mBitmap[1] = BitmapFactory.decodeResource(getResources(), R.drawable.x);
                mBitmap[2] = BitmapFactory.decodeResource(getResources(), R.drawable.x);
                mBitmap[3] = BitmapFactory.decodeResource(getResources(), R.drawable.x);

            getHolder().addCallback(this);
            mThread = new ViewThread(this);
        }

        public void doDraw(Canvas canvas) {
            canvas.drawColor(Color.BLACK);

            canvas.drawBitmap(mBitmap[0], 0, 0, null);
            canvas.drawBitmap(mBitmap[1], 45, 0, null);
            canvas.drawBitmap(mBitmap[2], 90, 0, null);
            canvas.drawBitmap(mBitmap[3], 135, 0, null);


        @Override
        public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
        // TODO Auto-generated method stub
        }

        @Override
        public void surfaceCreated(SurfaceHolder holder) {
            if (!mThread.isAlive()) {
                mThread = new ViewThread(this);
                mThread.setRunning(true);
                mThread.start();
            }
        }

        @Override
        public void surfaceDestroyed(SurfaceHolder holder) {
            if (mThread.isAlive()) {
                mThread.setRunning(false);
            }
        }

        @Override
        public boolean onTouchEvent(MotionEvent event) {

            mX = (int) event.getX() - mBitmap[0].getWidth() / 2;
            mX = (int) event.getX() - mBitmap[1].getWidth() / 2;
            mX = (int) event.getX() - mBitmap[2].getWidth() / 2;
            mX = (int) event.getX() - mBitmap[3].getWidth() / 2;

            return super.onTouchEvent(event);

        }




class ViewThread extends Thread {
    private Panel mPanel;
    private SurfaceHolder mHolder;
    private boolean mRun = false;

    public ViewThread(Panel panel) {
        mPanel = panel;
        mHolder = mPanel.getHolder();
    }

    public void setRunning(boolean run) {
        mRun = run;
    }

    @Override
    public void run() {
        Canvas canvas = null;
            while (mRun) {
                canvas = mHolder.lockCanvas();
                if (canvas != null) {
                    mPanel.doDraw(canvas);
                    mHolder.unlockCanvasAndPost(canvas);
                }
            }
    }

} 
</code></pre>

<p>how to moving bitmap to right and left one by one my bitmap</p>

<p>if bitmap moving then bitmap adjoining</p>

<p>whats wrong in my code?</p>

<p>how to solve this my code?</p>

<p>please help me</p>
