Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] java – How do I link 2 Pages in Android

Posted on November 11, 2022 By

Solution 1 :

In your MainActivity use this code:

  Intent intent = new Intent(MainActivity.this, Second.java);
  startActivity(intent);

Please read about “Intents”, I have added some links that will clear your concepts.
Previously asked question
Intent Types

Problem :

I have 2 actvities with a xml each but I don’t know how to switch to the second page with a button.

Can someone send me the code for the MainActivitie.java please (for a button)

I currently use the findView and onClick

Comments

Comment posted by How to start new activity on button click

Does this answer your question?

READ  [FIXED] multithreading - Running two different threads concurrently in android
Powered by Inline Related Posts
Android Tags:android, android-layout, android-studio, java, xml

Post navigation

Previous Post: [FIXED] android – LottieAnimationView doesn’t show in my_layout.xml
Next Post: [FIXED] android – Firestore conditional array query

Related Posts

[FIXED] android – How to Debug an App Outside of Visual Studio 2019-Pre? Android
[FIXED] android – ERROR: “E/AndroidRuntime: FATAL EXCEPTION: main” Android
[FIXED] listview – Attempt to invoke virtual method ‘void android.widget.TextView.setText(java.lang.CharSequence)’ on a null object reference on recyclerview kotlin Android
[FIXED] android – Can we pass nullable Argument in room query Android
[FIXED] android – I want to launch main activity after splash screen instead of login screen Android
[FIXED] android – How do I check Internet Connectivity using HTTP requests(Flutter/Dart)? Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What is the rising action in Julius Caesar?
  • How do you secure a rope to itself?
  • Does waterproof laminate scratch easily?
  • What makes a building prewar?
  • What can you learn in a month without alcohol?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme