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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:29:40+00:00 2026-05-28T15:29:40+00:00

how to link multiple form in android eclipse?* Do i have to make multiple

  • 0

how to link multiple form in android eclipse?*Do i have to make multiple xml files in res/layout/main.xml and if this how to use them?*

  • 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-28T15:29:41+00:00Added an answer on May 28, 2026 at 3:29 pm

    I’ll make a quick explanation for you at your level of understanding. You will want to follow the tutorial Houcine gave you, but to answer your question best I can:

    First off: A form is a field that users input information into. Like a textbox, or a checkbox. You CAN put multiple forms on a single page. For example:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />
    
    <EditText
        android:id="@+id/editText1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >
    
        <requestFocus />
    </EditText>
    
    <CheckBox
        android:id="@+id/checkBox1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="CheckBox" />
    
    <RadioButton
        android:id="@+id/radioButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="RadioButton" />
    
    <Spinner
        android:id="@+id/spinner1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    

    See, all sorts of forms!

    But I think what you mean to ask is, how do I link to different layouts.

    The answer to your second question is: Yes! Simply make a new xml file in your res>layout folder! Toss a <?xml version="1.0" encoding="utf-8"?> at the top then have fun!

    If you want to link to that new layout, make a button or something in main.xml. in the .xml file of that button, add android:onClick="doThis" (or whatever you want in the quotations) to the button.

    Now, make your second page (a new class) in the same directory as your main.java. Call it whatever you want. I’m going to call it Page2Activity.java.

    Now, to switch between layouts easily as a beginner, I found this is the easiest way: Lets say our second page was page2.xml, add this piece of code into your main activity’s java file.

        public void doThis(View view) {
        Intent page2 = new Intent();
        page2.setClassName("com.yourproject",
                "com.yourproject.page2Activity");
        startActivity(page2);
    

    This should take you to the next class! Great huh? But we still need to use our page2.xml. You could use inflaters, (read up on those sometimes), but for beginner’s sake just put

    setContentView(R.layout.page2);
    

    after

        public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    

    In your Page2Activity

    ONE MORE THING: You have to add your new activity to your manifest! Easy peasy. Open up your AndroidManifest.xml, and add

    <activity android:name=".Page2Activity"</activity>
    

    right after the first you see (which would be the main one)

    Try it out!

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

Sidebar

Related Questions

I have a form which has multiple input fields, and 3 main options. depending
i have multiple strings containing a link like: <A HREF=http://www.testings2>testings2</A> <A HREF=http://www.blabla>blabla</A> <A HREF=http://www.gowick>gowick</A>
I have multiple rows in a table, in one of which is a link
The problem is like this; A webpage contains multiple form elements, which can be
I have multiple textboxes in my form like txtTask0, txtTask1... txtTask12. so I want
I have a multiple select box which appears when I click the link 'Share'.
I have this web page I'm developing that displays multiple images of one product
I have a form element that contains multiple lines of inputs. Think of each
I have a function that parses text form posts and if there's a link
function GenKeyForm(FormNum){ document.GenNewKey+FormNum.submit(); } I have multiple forms within a php page. each form

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.