public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button = (Button) findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click
setContentView(R.layout.aboutus);
}
});
final Button buttonhome = (Button) findViewById(R.id.button1);
buttonhome.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click
setContentView(R.layout.main);
}
});
}
}
On Wednesday, 8 August 2012 19:18:05 UTC+5:30, parthi wrote:
HiOn Wed, Aug 8, 2012 at 6:48 PM, pankajdev <panka...@gmail.com> wrote:
Hi ,i am new to this forums , i have tried a sample android application using MOTODEV studio , i am not able to find few things , like how to setup the action for the button and if i setup an action how do i open the layout while i click over the button , i am having six button ,now i want if i click over one button it should load the layout or should be send to next screen to display content.Please guide with example or same code so that learning is easy.with regards--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment