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

  • Home
  • SEARCH
  • 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 7567989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:48:34+00:00 2026-05-30T14:48:34+00:00

I have one activity Select which has four buttons and other activity Result. Now

  • 0

I have one activity Select which has four buttons and other activity Result. Now i want to implement such logic that if button1 is pressed then it should show one EditText and one TextView in Result activity but if button2 is pressed then it should show 3 TextViews.
in other words i want to call a Result Activity with different views for different button clicks.
Please help me i am new in android development.
Thanks 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-30T14:48:36+00:00Added an answer on May 30, 2026 at 2:48 pm

    From Select you have to start Result with an extra parameter, like this:

    Intent intent = new Intent(this,Result.class);

    intent.putExtra("STYLE",1); //1 means you pressed the first button, 2 means second button etc.

    startActivity(intent);

    In Result, you have to get this extra in onCreate

    int extra = getIntent().getIntExtra("STYLE",0);

    and build the layout dinamically:

    if(extra == 1)

    {

    // build style one

    } else if(extra == 2) { ... }
    …

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

Sidebar

Related Questions

I have one application which uses the standard .NET forms authentication cookie, now I
I have collection_select in one of my views, which properly creates a HTML <select>
I have one requirement in which User will have options to select languages for
I have two SQL queries, where the first one is: select Activity, SUM(Amount) as
My current application has one Activity, the main one which extends ListActivity (listview of
I have one activity(MyActivity), in which I have a grid view. Also I have
I have to include one report in my application showing offline/online activity of few
I have one std::list<> container and these threads: One writer thread which adds elements
I have one aspx page with some controls. Also i have one DIV which
I am using tab view in one of my activity. I want to change

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.