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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:14:45+00:00 2026-06-13T20:14:45+00:00

I make a custom Listview with image. My items.xml is like this: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android

  • 0

I make a custom Listview with image. My items.xml is like this:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dip"
    android:soundEffectsEnabled="true"
>

    <ImageView
        android:layout_width="50dip"
        android:layout_height="50dip"
        android:id="@+id/imgViewLogo"   
        android:layout_alignParentLeft="true"
        android:layout_centerInParent="true"
        android:scaleType="center">
    </ImageView>

    <TextView
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:id="@+id/txtViewTitle"
        android:layout_toRightOf="@+id/imgViewLogo"
        android:layout_marginLeft="2dip"
        android:textColor="#000000">
    </TextView>

    <TextView
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:id="@+id/txtViewDescription"
        android:layout_toRightOf="@+id/imgViewLogo"
        android:layout_below="@+id/txtViewTitle"
        android:layout_marginLeft="2dip"

        android:textColor="#000000">
    </TextView>

</RelativeLayout>

enter image description here

That’s working, when but I touch it and move it my custom list view, it’s broken. I think there may be problems with this background main.xml:

enter image description here

My main.xml is like this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
        android:background="@drawable/gradient_body"
android:focusable="true"
    >
    <ListView 
        android:id="@+id/listView1" 
        android:background="@drawable/gradient_body"
        android:focusable="true"
        android:layout_height="fill_parent" 
        android:layout_width="fill_parent"
        android:divider="#c0bbbb"
        android:dividerHeight="1dp"
></ListView>
</LinearLayout>

I’m tired to change other attribute, and it isn’t working.

  • 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-13T20:14:46+00:00Added an answer on June 13, 2026 at 8:14 pm

    Instead of putting

    android:background="@drawable/gradient_body"
    

    in the listview in your main.xml add it in relativeLayout in you items.xml just like this

    <RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativeLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dip"
    android:background="@drawable/gradient_body"
    android:soundEffectsEnabled="true" >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have such a activity with my list: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
I have a ListView with custom adapter and a layout for items in this
I need to make a custom ListView with multiple view types. I found this
I have a problem when I want to make custom listview in android. MyListView
I have a custom listView defined like this public class DDListView extends ListView implements
i need to make a custom listview in windows7 phone. In this listview, i
I want to make a ListView like the foursquare (image below). I'm familiar with
I am trying to make Custom RelativeLayout which can scale and scroll. Right now
How to make a custom Edittext,so that it will look like as 45 degree
I've got a ListView with a custom BaseAdapter. The list items contain CheckBoxes that

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.