Android app help!!!

smithmanny

New Member
Joined
Jul 28, 2010
Messages
7
Reaction score
0
Location
Atlanta, GA
I am trying to make my image button clickable and send it to another screen so it can display info. Can someone help me with the code?!
Here is my code:
package com.member.ofwgkta;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;



public class MainActivity extends Activity {
private ImageButton domoButton;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
domoButton = (ImageButton) findViewById(R.id.domo);
domoButton.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
Intent intent = new Intent(home.this, Activity2.class);
startActivity(intent);
// TODO Auto-generated method stub

}

});
}
}
 
Top