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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:32:40+00:00 2026-06-07T04:32:40+00:00

Hi I am using listview which have multiple items adding dynamically.. I want to

  • 0

Hi I am using listview which have multiple items adding dynamically..
I want to change the text color of listitem any idea

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent" 
       android:layout_height="wrap_content"
       android:background="#659EC7">

    <ImageView android:id="@+id/icon" android:layout_width="72px"
        android:layout_height="wrap_content"
                android:layout_marginTop="5px" />

    <TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
        android:orientation="vertical" 
                android:paddingTop="5px" 
                android:paddingBottom="5px">

        <TextView android:id="@+id/item1" android:layout_width="match_parent"
            android:layout_height="wrap_content" 
                         android:textAppearance="?android:attr/textAppearanceMedium" />

        <TextView android:id="@+id/item2" android:layout_width="match_parent"
            android:layout_height="wrap_content" 
                       android:textAppearance="?android:attr/textAppearanceSmall"
            android:paddingTop="30px" />
            <View
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="@android:color/darker_gray"/>

    </TwoLineListItem>

</LinearLayout>

I am using 2linelistIem

  • 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-07T04:32:42+00:00Added an answer on June 7, 2026 at 4:32 am

    Here is the code I wrote and used:
    It keeps the android style for all other states. it just overlays the transparent state with your desired color:

    Layer list drawable for list view with custom background

    as you can see in my question there is a minor bug with the focused state, but it is still the best solution i ever saw 😀

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

Sidebar

Related Questions

I have a ListView which contains a text field that is populated using a
I have a custom adapter for my ListView which has multiple TextViews. I want
I have an array of strings which I want to display using a ListView.
I have a ListView which is using a GridView to display a DataTable and
I have the following ListView in which I am using the JQuery UI sortable
I have an ASP.Net site, in which I am using a ListView with a
I'm using ListView to show search results. I have a Coustomized arrayListAdapter which returns
I have an activity which downloads images in background in a listView using AsyncTask,
I have a ListView which is populated by a SQLite query in OnCreate using
I have a ListView control which I used to populate using an ASP ObjectDataSource

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.