]

Aug 17, 2016

How to Go to Next Page and Display Message [Android Programming]




How to Create Android Application?

  • Open Eclipse
  • File > New > Android Application Project
  • Insert Name and Others.
  • Finish

Refer Video on Last

How to Display Message When Pressed a Button?

  • Create Button and Initializing
  • Create Click Listener

button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub } });

  • Inside Listener Add Display Message Code

Toast.makeText(getApplicationContext(), "Successfully Go to First Page", Toast.LENGTH_SHORT).show(); 
How to Go Next Page When Pressed a Button?
  • Create Button and Initializing
  • Create Click Listener
  • button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub } });
  • Inside Listener Add Movement Code
  • Intent intobj=new Intent(SecondActivity.this, MainActivity.class);
    startActivity(intobj);

    Video Tutorials 

0 comments:

Post a Comment

Enter your email address: