Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6816621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:56:51+00:00 2026-05-26T20:56:51+00:00

I have my main Activity with two Buttons on it. When I start the

  • 0

I have my main Activity with two Buttons on it. When I start the application, you can click on one Button and it will take you to the right Activity, but I can click the second Button a hundred times and nothing happens. It looks just like the first Button and changes to the usual blue color when I press it, BUT if I go the the first button's Activity, then go BACK to the first Activity, the second Button works. I don’t understand what’s going on here.

Main Activity:(Note, SignUp is the button that doesn’t work):

public class GameNetActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.first);
    getWindow().setSoftInputMode(
    WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
    
                Button SignIn = (Button) findViewById(R.id.button1);
    SignIn.setOnClickListener(new View.OnClickListener() {
                public void onClick(View view) {
                    Intent myIntent = new Intent(view.getContext(), Welcome.class);
                    startActivityForResult(myIntent, 0);
                    
                    
            Button SignUp = (Button) findViewById(R.id.button2);
    SignUp.setOnClickListener(new View.OnClickListener() {
        public void onClick(View view) {
            Intent myIntent = new Intent(view.getContext(), Signup.class);
            startActivityForResult(myIntent, 0);
                }

            });
        }
    });
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:56:52+00:00Added an answer on May 26, 2026 at 8:56 pm

    You have registered for the onClickListener for SignUp button within the onClickListener of SignIn button. Take that out and put it separately in the onCreate().

    public void onCreate(Bundle savedInstanceState) {
    ...
    ....
        Button SignIn = (Button) findViewById(R.id.button1);
        SignIn.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent myIntent = new Intent(view.getContext(), Welcome.class);
                startActivityForResult(myIntent, 0);
            }
        });
    
    
        Button SignUp = (Button) findViewById(R.id.button2);
        SignUp.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent myIntent = new Intent(view.getContext(), Signup.class);
                startActivityForResult(myIntent, 0);
            }
        });
    ...
    ...}
    

    Hope this helps!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Activity with two layouts, both implemented in R.layout.main. The first one
I have two activities, one is main and I have another activity called Test
I have 3 activity in my application. My first activity (Main) has 2 button
I am using Button in main Activity. When i clicked this button it will
My situation is following. I have one Activity that contains three main parts. At
In my application I start a Register activity from the Main Activity with a
I'm writing an application which have two modes; one view mode and one edit
I have four EditText and two buttons namely, save and review button. If i
in the main activity of my app i have placed a button named as
I have an application widget that contains a button. Once I click the button,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.