I\'m new in the android develop world. I created simple application and created a simple GUI with one button. If the user presses this button, I want to change the screen
You can do something like this:
import android.view.View;
/** Called when the activity is first created. */
public class YourActivity extends Activity implements View.OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button = (Button) findViewById(R.id.your_button_id);
button.setOnClickListener(this);
}
public void onClick(View v) {
Intent intent = new Intent(your_present_activity.this, target_activity.class);
startActivity(intent);
}
}