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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:16:37+00:00 2026-05-27T06:16:37+00:00

I am very new to android. My project requires me to create a list

  • 0

I am very new to android. My project requires me to create a list view and change multiple pieces of data in other views based on the user’s selection. So, say I choose a person’s name from the list. I want to change an ImageButton image, a TextView, and connect an array for that specific person. I’ve been using text processing on the string of the user’s selection and making sure my resources match a certain format. But, I feel there should be a better way. If you can’t tell already, I am also very new to programming.

I am looking for the simplest, but somewhat efficient solution to this.

EDIT: Here is some code WRT an List with an array called people:


// Handles User Selection of People

    peopleList.setOnItemClickListener( new OnItemClickListener() {
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

    // Get Selection String
    person1SavedText = people[position];

    // Modify String to match corresponding resources and values
    String people1ImageParsed = person1SavedText.toLowerCase().replace(" ", "").replace("-", "");

    // Person 1 Image Uri/String
    person1ImageUriString = "android.resource://org.example.person/drawable/" + person1ImageParsed;
    person1ImagePath = Uri.parse(person1ImageUriString);

    // Person 1 Array Uri/String
    person1ArrayUriString = "android.resource://org.example.person/values/" +     person1ImageParsed;
    }
}

  • 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-27T06:16:37+00:00Added an answer on May 27, 2026 at 6:16 am

    Sounds like you need to store temporary information based on a selection, then lookup data based on that selection, correct? I would use the built-in android preferences to store the selected item index (or other means of idntification) then lookup the ImageButton image, textview etc based on the value that is store in preferences. The preferences are available to everything withing the application if setup properly.

    Shared Preferences details:http://developer.android.com/guide/topics/data/data-storage.html#pref

    Google for “android sharedPreferences examples” for more assistance.

    Best!

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

Sidebar

Related Questions

I'm doing Major Project on my final year and I'm very new to Android
I'm doing Major Project on my final year and I'm very new to Android
Very new to Android and trying to install a Android project from an SVN
I am very new to android and I am developing this app which allows
I'm following the android developer tutorials on tab layouts. (im very very new to
I'm new to Android dev. There's a very pretty state diagram of the MediaPlayer
I'm new at Eclipse and the Android applications making so here comes a very
Very new mobile developer here... I am trying to retrieve a list of tweets
I m new to android application development. I made a project on getting feeds
Im an Android noob, coming from objC, I have a very stupid question (project

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.