Answers for "link to new page in android studio"

10

intent android open activity

Intent intent = new Intent(this, DisplayMessageActivity.class);
        intent.putExtra(key:,value:);
        startActivity(intent);
Posted by: Guest on May-19-2020
0

how to move from one activity to another in android studio on button click

private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main4);
        button = (Button)findViewById(R.id.button7);

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                openInsideActivity4();
            }
        });
    }
    public void openInsideActivity4()
    {
        Intent intent = new Intent(this,InsideActivity4.class);
        startActivity(intent);
    }
Posted by: Guest on June-07-2020

Code answers related to "link to new page in android studio"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language