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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:20:28+00:00 2026-06-13T00:20:28+00:00

I am a newbee in Android app creating world. I am creating an app

  • 0

I am a newbee in Android app creating world.

I am creating an app where multiple choice questions are there. And, it could be 25, 50 or 100 depend on what user chooses. Now in an Activity, there would a question with 4 options along with next/prev button to navigate to the next or previous question.
How can I achieve the next/previous button function which will display the next/previous question in the same activity just updating the content with new question or previously answered question?
Any help would be appreciated.

Thanks 🙂

  • 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-06-13T00:20:29+00:00Added an answer on June 13, 2026 at 12:20 am

    A simple way (although maybe not the best in other’s opinions) is to define one Activity with a TextView for the question and a RadioGroup with RadioButtons for the answers. (And ofcourse the buttons.)

    Then, whenever one of the buttons is pressed, dynamically change the contents of the TextView so that the right question appears and change the contents of the radiobuttons so that the possible answers appear. Store whichever RadioButton is chosen whenever the user presses one of the buttons.

    You could store the questions and answers in a database. The onClickListener() assigned to the button should then get the next record in the database and use yourTextView.setText(theQuestionFromTheDB). Same holds for the answers.
    To store the chosen answer you can use

    int selectedId = radioSexGroup.getCheckedRadioButtonId();
    

    and then write that value to the database.

    Instead of a database, you could also use collectiosn like an arrays in your code, but I think this will be kind of painful to read all the questions to it initially. This is ofcourse, depending on where you get the questions from. If it is a raw .txt file or something that you dynamically want to read into your app, then an array or ArrayList is not all that bad.

    For an example of how to add and use RadioButtons in your activity UI, click here.

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

Sidebar

Related Questions

I am developing an Android app which takes the current location of the user
I am a new bee to Android App Development . I am practicing the
I am newbie in android, in my android app, a main Activity class, which
I am a newbie to Android development. I am writing an app for my
i am newbie for Android Development. i don't have any idea for creating Scientific
I am a newbie to Android app development. For 1 of my project, I
Newbie question. After I have written the Android App (easy part) I need to
posting from an app (iOS android etc..) not a web form. class someImage(models.Model): image
Can I create an Android app that will work on all version of Android?
I need a certain layout for an android app. I have the custom buttons

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.