I want to make an image button linked to different part of the app....
I am new in this and could easily have missed something...........

"import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class s1 extends Activity {

        final public void a(){
                Intent i1 = new Intent(this, HelloWorldImageActivity.class);
                i1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(i1);
        }

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

                Button b1 = (Button) findViewById(R.id.imageButton1);
                b1.setOnClickListener(new Button.OnClickListener(){
                        public void onClick(View v){
                                a();
                        }
                });

        }
}"

HelloWorldImageActivity is another file in the same package..... I am
aiming at making a grid type layout.... Please help me out..........

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to