How can I separate this code for greater clarity?
<p>I made a Memory Game for Android.</p>

<p><strong>My problem is that all the code is in one class. So I need to separate the code with a new class to help make it more clear.</strong></p>

<p>This is the code:</p>

<pre><code>public class NivelA extends Activity implements OnClickListener{

private int [] fichasIds = {
        R.drawable.img_1,
        R.drawable.img_2,
        R.drawable.img_3,
        R.drawable.img_4,
        R.drawable.img_5,
        R.drawable.img_6,
        R.drawable.imgOculto,   
};

protected int[] fichas;

private ImageView[] imageviews;

private static final int cantFichas = 6;

private int fichasUp;

private int currentIndex = -1;

private int lastIndex = -1;

private int fichasIguales = 0;

private int vidas = 3;
private TextView vidas_txt;

Handler handler;

private int [] imgIds = {
        R.id.img_1,
        R.id.img_2,
        R.id.img_3,
        R.id.img_4,
        R.id.img_5,
        R.id.img_6,
        R.id.img_7,
        R.id.img_8,
        R.id.img_9,
        R.id.img_10,
        R.id.img_11,
        R.id.img_12,
};

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.nivel1);

    //Toast
    Toast toast = Toast.makeText(NivelA.this, "Nivel: 1", Toast.LENGTH_SHORT);
    toast.setGravity(Gravity.CENTER|Gravity.CENTER, 0, 65);
    toast.show();

    handler = new Handler ();

    fichasIguales = 0;

    vidas_txt = (TextView) findViewById(R.id.vidas_iguales);

    fichas = new int [12];

    for (int i=0; i&lt;12; i++)
    {
        fichas[i] = -1;
    }

    imageviews = new ImageView [imgIds.length];
    for (int i=0; i&lt;imgIds.length; i++)
    {

        imageviews[i] = (ImageView) findViewById(imgIds[i]);
    }

    Random random = new Random ();

    for (int i=0; i&lt;6; i++){
        for (int z=0; z&lt;2; z++)
        {
            int fichasRandom = random.nextInt(12);
            while (fichas[fichasRandom]!= -1)
            {
                fichasRandom = random.nextInt(12);
            }
            fichas[fichasRandom]= i;
        }
    }

    //Los listener
    for (int i=0; i&lt;12; i++)
    {
        ((ImageView)findViewById(imgIds[i])).setOnClickListener(this);
    }

    for (int i=0; i&lt;12; i++)
    {
        ((ImageView)findViewById(imgIds[i])).setImageResource(R.drawable.imgOculto);
    }
}
@Override
public void onClick(View v) {
    int index = Integer.parseInt((String)v.getTag());

    for (int i=0; i&lt;12; i++)
    {
        if (v.getId() == imgIds [i])
        {
            index = i;
            ((ImageView)findViewById(imgIds[i])).setImageResource(fichasIds[fichas[i]]);

            imageviews[i].setFocusable(false);
            imageviews[i].setClickable(false);
            break;
        }
    }
    fichasUp++;

    if (fichasUp == 2)
    {
        vidas--;
        vidas_txt.setText(String.valueOf(vidas));

        currentIndex = index;

        for (ImageView view:imageviews)
        {
            view.setFocusable(false);
            view.setClickable(false);
        }

        fichasUp = 0;
        handler.postDelayed(fichasOcultas, 1000);

    }
    else{
        lastIndex = index;
    }

}

Runnable fichasOcultas = new Runnable() {

    @Override
    public void run() {
        // TODO Auto-generated method stub

        if (fichas[currentIndex]== fichas[lastIndex])
        {
            ((ImageView)findViewById(imgIds[lastIndex])).setVisibility(View.INVISIBLE);
            ((ImageView)findViewById(imgIds[currentIndex])).setVisibility(View.INVISIBLE);

            fichasIguales ++;


            //Toast [ Hay Coincidencia ]
            Toast toast = Toast.makeText(NivelA.this, "Hay Coincidencia!", Toast.LENGTH_SHORT);
            toast.setGravity(Gravity.CENTER|Gravity.CENTER, 14, 0);
            toast.show();

            if (fichasIguales == cantFichas)
            {
                win ();
            }
        }else
        {
            ((ImageView)findViewById(imgIds[currentIndex])).setImageResource(R.drawable.imgOculto);
            ((ImageView)findViewById(imgIds[lastIndex])).setImageResource(R.drawable.imgOculto);
        }


        for (ImageView view:imageviews)
        {
            view.setFocusable(true);
            view.setClickable(true);
        }
    }

};
protected void win() {
    Toast toast = Toast.makeText(NivelA.this, "Ganaste!!", Toast.LENGTH_SHORT);
    toast.show();

}

}
</code></pre>
