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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:24:11+00:00 2026-06-17T22:24:11+00:00

I am trying to create a list view that will have an icon and

  • 0

I am trying to create a list view that will have an icon and a text in one row and a subtext in another row. for example

I created a custom adapter to support this and I do get an image, a text and a subtext, however each one is under the previous one.
for example
image
IMDB
account

my XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp">
        
    
    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="0"
        android:orientation="vertical" >

        <ImageView
            android:id="@+id/imgIcon"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_marginBottom="5dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="5dp"
            android:gravity="center_vertical" />
        
         <TextView
            android:id="@+id/txtTitle"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_marginBottom="5dp"
            android:layout_marginTop="5dp"
            android:gravity="center_vertical"
            android:textColor="#000000"
            android:textSize="20sp"
             />
        
        <TextView
            android:id="@+id/subString"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
             />
    </LinearLayout>

</LinearLayout>

I tried to move the image and the text to be under the first linear layout, but then everything is going crazy , and I can no longer see the text or the subtext
any ideas?

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-17T22:24:12+00:00Added an answer on June 17, 2026 at 10:24 pm

    It might be easier to use one RelativeLayout, but this should give you the layout in your image:

    <LinearLayout 
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="horizontal" 
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="10dp">
    
        <ImageView
            android:id="@+id/imgIcon"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_marginBottom="5dp"
            android:layout_marginRight="15dp"
            android:layout_marginTop="5dp"
            android:gravity="center_vertical" />
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >
    
            <TextView
                android:id="@+id/txtTitle"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="5dp"
                android:layout_marginTop="5dp"
                android:gravity="center_vertical"
                android:textColor="#000000"
                android:textSize="20sp" />
    
            <TextView
                android:id="@+id/subString"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" />
    
        </LinearLayout>
    
    </LinearLayout>
    

    Or do you want the layout that you described, not showed? Anyway with the layout that you posted you could only see the ImageView because the nested LinearLayout has vertical orientation and the ImageView’s height was set to fill_parent… So the TextViews were pushed off the bottom of the layout.

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

Sidebar

Related Questions

I'm trying to create a custom list which will have checkboxes that allow you
I'm trying to have a list of items that when touched will open another
I'm trying to create a list of videos that a user may view. This
I'm trying to create an Android ListView that will look like Instagram pictures feed
I am trying to create a listview that receives a flagged list of items
I'm trying to create a drop down list in an ASP.NET MVC3 view based
I'm trying to create a page by using view 2. This page list all
I'm trying to create a list and i'm being stumped. So I have a
I am trying to create an app that has a list of users and
I have a list view that is displaying data using the gridview. This list

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.