Confusing android error
<p>im making a game in which im using 2 classes. one class is used to make aliens the other class implements the game but its giving me some error when i use the alien class. if i integrate the alien class in the game class then it works fine. I cant figure out what im missing.</p>

<pre><code>GAME CLASS:
package com.saad.alien;

import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.RectF;
import android.os.Bundle;
import android.view.Display;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnTouchListener;

public class Game extends Activity implements OnTouchListener {

    CustomView Cview; // my custom view
    // /////////////////////////////////////////////////////////////////////////////
    // /////////////////// MAN VARIABLES ////////////////////////////////////
    // ///////////////////////////////////////////////////////////////////////
    float x, y, left = 0, top = 0, right = 0, bottom = 0;
    float dx, dy, length, length1, height, height1;
    Bitmap man; // the pictures
    int done = 0;
    RectF rman = new RectF(50, 50, 150, 150);// sample rect in start
    // ///////////////////////////////////////////////////////////////////////
    // ///////////////// ALIEN1 VARIABLES /////////////////////////////////
    // ///////////////////////////////////////////////////////////////////
    makeAlien alien1;


    int setScreenX, setScreenY;
    int sWidth, sHeight; // screen size and width

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

        Cview = new CustomView(this);
        Cview.setOnTouchListener(this);
        Display display = getWindowManager().getDefaultDisplay();
        sWidth = display.getWidth();
        sHeight = display.getHeight();
        setScreenX = 480 / sWidth;
        setScreenY = 800 / sHeight;
        // //////////////////////////////////////////////////
        // / set up man //////////////////////////////////
        // ///////////////////////////////////////////////
        x = 50 * setScreenX;
        y = 650 * setScreenY;
        dx = dy = 0;
        man = BitmapFactory.decodeResource(getResources(), R.drawable.man);
        // ////////////////////////////////////////////////////////////////
        // ///////////// set up alien 1///////////////////////////////////
        // ///////////////////////////////////////////////////////////////
        alien1.setAlien(50, 300, 10, setScreenX, setScreenY);
/////////////////////////////////////////////////////////////////////////
        setContentView(Cview);
    }

    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
        Cview.pause();
    }

    @Override
    protected void onResume() {
        // TODO Auto-generated method stub
        super.onResume();
        Cview.resume();
    }

    public boolean onTouch(View v, MotionEvent event) {
        // TODO Auto-generated method stub

        try {
            Thread.sleep(1);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        switch (event.getAction()) {

        case MotionEvent.ACTION_DOWN:
            dx = event.getX();
            dy = event.getY();
            length = x - ((man.getWidth() / 2) * setScreenX);
            length1 = x + (3 * (man.getWidth()) / 2) * setScreenX;
            height = y - (man.getHeight() / 2) * setScreenY;
            height1 = y + 3 * (man.getHeight() / 2) * setScreenY;

            if (dx &gt; length &amp;&amp; dx &lt; length1 &amp;&amp; dy &gt; height &amp;&amp; dy &lt; height1) {
                done = 1;
            }
            break;
        case MotionEvent.ACTION_MOVE:
            if (done == 1) {
                x = event.getX();
                y = event.getY();
            }
            break;
        case MotionEvent.ACTION_UP:
            if (done == 1) {
                x = event.getX();
                y = event.getY();
                done = 0;
            }
            break;
        }

        return true;
    }

    public class CustomView extends SurfaceView implements Runnable {

        SurfaceHolder ourHolder;
        Thread ourThread = null;
        boolean isRunning = false;

        public CustomView(Context context) {
            super(context);
            ourHolder = getHolder();
        }

        public void pause() {
            isRunning = false;
            while (true) {
                try {
                    ourThread.join();
                } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                break;
            }
            ourThread = null;
        }

        public void resume() {
            isRunning = true;
            ourThread = new Thread(this);
            ourThread.start();
        }

        public void run() {
            while (isRunning) {
                if (!ourHolder.getSurface().isValid())
                    continue;

                Canvas can = ourHolder.lockCanvas();
                can.drawRGB(0, 0, 0);
                // //////////////////////////////////////////////////////////////////
                // ////////////// MAN ////////////////////////////////////
                // /////////////////////////////////////////////////////////////////
                left = (x - (man.getWidth() / 2)) * setScreenX;
                right = (x + (man.getWidth() / 2)) * setScreenX;
                top = (y - (man.getHeight())) * setScreenY;
                bottom = (y + (man.getHeight() / 3)) * setScreenY;
                rman.set(left, top, right, bottom);
                can.drawBitmap(man, null, rman, null);
                // ///////////////////////////////////////////////////////////////
                // ////////////////// ALIEN /////////////////////////////////
                // ///////////////////////////////////////////////////////////////


                alien1.moveAlien(sWidth);
                can.drawBitmap(alien1.al, null, alien1.ral, null);

                // //////////////////////////////////////////////////////////////////
                // ///////////////// COLLISON //////////////////////////////
                // //////////////////////////////////////////////////////////////

                ourHolder.unlockCanvasAndPost(can);

            }

        }


    }

}

ALIEN CLASS:
package com.saad.alien;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Rect;

public class makeAlien extends Activity{

    Bitmap al;
    int alX, alY;
    Rect ral = new Rect(10, 10, 15, 15); // rect for alien
    int aleft, aright, atop, abot; // dimension of ral
    int alspeed; // speed of alien
    int setScreenX, setScreenY;
    int sWidth, sHeight; // screen size and width



    public void setAlien(int x, int y, int speed, int setScreenX, int setScreenY){
        al = BitmapFactory.decodeResource(getResources(), R.drawable.al);
        alX = x * setScreenX;
        alY = y * setScreenY;
        alspeed = speed * setScreenX;
        aleft = alX;
        aright = alX + (al.getWidth() * setScreenX);
        atop = alY;
        abot = alY + (al.getHeight() * setScreenY);

    }

    public void moveAlien(int sWidth){
        if (aright &gt;= sWidth || aleft &lt;= 0)
            alspeed = -alspeed;

        aleft = aleft + alspeed;
        aright = aright + alspeed;
        ral.set(aleft, atop, aright, abot);

    }

}
</code></pre>
