Answers for "android move to another activity"

2

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

// also use set onclick listener
 public void next(View view) {
        Intent intent = new Intent(this,Activity2.class);
        startActivity(intent);
   }
Posted by: Guest on June-07-2020
2

go to activity android

//going to another activity while ending the 
//previous one so that users cannot go back
btListe = (ImageButton)findViewById(R.id.Button_Liste);
    btListe.setOnClickListener(new OnClickListener()
    {    public void onClick(View v)
        {
            intent = new Intent(main.this, ListViewImage.class);
            startActivity(intent);
            finish();
        }
    });
Posted by: Guest on October-08-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 "android move to another activity"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language