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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:10:14+00:00 2026-06-16T08:10:14+00:00

I am new in android. I have a list that must be viewed like

  • 0

I am new in android.

I have a list that must be viewed like this:
PIC NAME DESC

I have a list of buckets that contains all 3 info above.
The problem is, I can only make one field appear in the view. In this case, the bucket.getBucketName().

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        List<Bucket> buckets = BucketHandler.getBucketList();
        List<String> bucketList = new ArrayList<String>();
        for (Bucket bucket : buckets){
            bucketList.add(bucket.getBucketName());
        }
        setListAdapter(new ArrayAdapter<String>(this, R.layout.row,
                R.id.bucket_list, bucketList));
    }

MY .xml is as follows:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">    

    <ListView
        android:id="@id/android:list"
        android:layout_width="fill_parent"
        android:layout_height="0dip"
        android:layout_weight="1"
        android:drawSelectorOnTop="false"/>

    <TextView
        android:id="@id/android:empty"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:text="@string/noData"/>


</LinearLayout>

Row Layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" 
    android:background="@color/lightgray">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:contentDescription="@string/none"
        android:src="@drawable/ic_launcher" />

    <TextView
        android:id="@+id/bucket_list"
        android:layout_width="210dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dp"
        android:layout_marginTop="15dp"/>

    <TextView
        android:id="@+id/bucket_percentage"
        android:layout_marginTop="15dp"
        android:layout_width="40dp"
        android:layout_height="wrap_content"
        android:layout_marginRight="10dp"
    />

    <TextView
        android:id="@id/android:hidden_id"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:visibility="gone"
    />

</LinearLayout>

How can I render all three fields inside the item list?
Thank you.

  • 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-16T08:10:15+00:00Added an answer on June 16, 2026 at 8:10 am

    Create your own custom adapter by extending ArrayAdapter and override getView () method

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

Sidebar

Related Questions

hi to all i am new to android i have to send my different
I'm new to Android programming . I have a list of items, when the
I am quite new to java android programming and I have a problem that
I am developing an Android Application and I have an Activity that looks like
I have list view with custom row layout (list_row.xml) that contains CheckBox element: <TableLayout
I current have an expandable list that I'd like to be able to search
I currently have an Android ListView class that displays a list of about 20
I have a list that calls simple_list_item_1, now I want to customise this cell,
i have created listview as follows... lv = (ListView) findViewById(R.id.listview); lv.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_checked, mDisplay));
I am a bit new with android but I have some java experience. So

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.