Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Using Intent in android application

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 155
    Comment on it

    While building android apps you need to start and end activities in background or in foreground according to your need

    Intent is the interface through which you can interact with the OS.

    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button orderButton = (Button) findViewById(R.id.order);
        orderButton.setOnClickListener(new OnClickListener() {
    
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(FirstActivity.this,OrderScreen.class);
                startActivity(intent);
            }
        });
    
     }
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: