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 6527977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:29:31+00:00 2026-05-25T09:29:31+00:00

I followed this tutorial (It’s old, but I couldn’t find any others; http://learnandroid.blogspot.com/2008/01/opening-new-screen-in-android.html )

  • 0

I followed this tutorial (It’s old, but I couldn’t find any others; http://learnandroid.blogspot.com/2008/01/opening-new-screen-in-android.html)

So, I have it so that when I click on some text, it should open a different layout.

This is the XML code for the text I click on to open it:

<TextView android:textAppearance="?android:attr/textAppearanceSmall" 
android:layout_height="wrap_content" 
android:text="Not a member? Sign up now!" 
android:layout_width="wrap_content" 
android:id="@+id/signupText" 
android:layout_gravity="center"></TextView>
</LinearLayout>

And this is the Java coding for the Layout with the clickable text on it (The first “screen”):

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class NetworkActivity extends Activity {
public void onCreate(Bundle icicle)
   {
      super.onCreate(icicle);
      setContentView(R.layout.main);
      TextView click = (TextView) findViewById(R.id.signupText);
      click.setOnClickListener(new View.OnClickListener() {
          public void onClick(View arg0) {
          Intent i = new Intent(NetworkActivity.this, Signup.class);
          startActivity(i);
          } 
       });
    }
 }

The Java code for the second layout:

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class Signup extends Activity
{
public void onCreate(Bundle icicle)
{
  super.onCreate(icicle);
  setContentView(R.layout.signup);
  TextView b = (TextView) findViewById(R.id.signupText);
  b.setOnClickListener(new View.OnClickListener() {
     public void onClick(View arg0) {
     setResult(RESULT_OK);
     finish();
     } 
  });
 }
}

There’s nothing special in the XML code for the second layout. (Should there be?)

When I click on the text in the Emulator, I get the error message that it’s closed unexpectedly. How do I fix this?

Oh, and I saw other questions kind of like mine, but they weren’t any help. I’m new to all this, so please don’t get angry if I’ve done something “wrong”. Thanks for the help in advance. =]

  • 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-25T09:29:31+00:00Added an answer on May 25, 2026 at 9:29 am

    Most likely you didn’t register your second activity in your android manifest. You need to create a <activity> tag for each one in your app. There should be an error in the logcat, basically saying “Could not find activity (Have you declared it in your manifest?)”.

    All you have to do to fix this, is add the tag inside your <application> tag:

    <activity android:name=".Signup" android:label="@string/title_of_the_activity" />
    

    See the <activity> tag documentation for further information.

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

Sidebar

Related Questions

I've followed this tutorial: http://anandhansubbiah.com/blog/writing-your-first-android-application/ , but no matter what I do, and what
I have followed this tutorial and added iAd to my app: http://bees4honey.com/blog/tutorial/how-to-add-iad-banner-in-iphoneipad-app/ But the
i followed this tutorial (http://github.com/tupps/OpenFlow) for creating cover-flow , but in open flow openflow
I followed this tutorial to create multilingual site. http://nuts-and-bolts-of-cakephp.com/2008/11/28/cakephp-url-based-language-switching-for-i18n-and-l10n-internationalization-and-localization/ However although I can get
I have followed this tutorial ( http://stuffthathappens.com/blog/2008/11/13/android-animation-101/ ) and have a beautiful rotating text
I followed this tutorial: http://codeigniter.com/wiki/Internationalization_and_the_Template_Parser_Class/ The controller that loads the language is this one:
I followed this tutorial to setup SVN on my Fedora box http://www.ashishkulkarni.com/installing-subversion-on-fedora-linux/ It worked.
I have followed this tutorial: http://www.phpjabbers.com/how-to-make-a-php-calendar-php26-6.html#comments to make a very basic calendar. My aim
I've followed this tutorial and it works fine: http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/ However my problem is that
Ok, sorry if this question is stupid. I followed this tutorial: http://www.youtube.com/watch?v=E30_-pQGQXs . Now

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.