Interapt current action and chang activity
<p>I want to consider follow example.</p>

<pre><code> btnRegistr.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {

            int x= 0;
            while(1==1){
                x++;
        }
        });

   btnTest.setOnClickListener(new View.OnClickListener() {

       public void onClick(View v) {

        Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.google.com"));
            startActivity(browserIntent);

        }
        });
}
</code></pre>

<p>When I am clicking btnRegistr started infinite cycle.
After that I want   when I am clicking Test button,interapt the cycle and go to another activity.
Is it possible??
Like this,in my application when user attemting get some data from remote server and in that time he click another button for some action(change activity for exmp),I want to stop that process and follow new command of user.
And another problem,when I am clicking back button the activity does not changed ,but I have read that current acivity is distroyed and started previous activity.<br>
Thanks.</p>
