Answers for "intent android"

5

intent in fragment android

Button button = (Button) rootView.findViewById(R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
        Intent intent = new Intent(getActivity(), AnotherActivity.class);
        startActivity(intent);
    }
});
Posted by: Guest on June-15-2020
1

android studio intent usage

Intent i = new Intent(MainActivity.this, ActivityTwo.class);
startActivity(i);
Posted by: Guest on December-07-2020
2

intent android

Intent intent = new Intent(MainActivity.this,MainActivity2.class);
 intent.putExtra("key",value);
 startActivity(intent);
////////////////////
 String string =getIntent().getStringExtra("key");
Posted by: Guest on May-05-2021
0

intent class for url and phone and others

Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.vogella.com/"));
startActivity(i);
Posted by: Guest on April-17-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language