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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:05:00+00:00 2026-05-22T21:05:00+00:00

I have an app in android that in some activity it displays using a

  • 0

I have an app in android that in some activity it displays using a item list the content from a column from the DB.

this is the way I’m doing it:

lv = (ListView) findViewById(R.id.list);

    Cursor cursor = db.getAllData();
        startManagingCursor(cursor);

        adapter = new SimpleCursorAdapter(this, R.layout.listitem, cursor,
                new String[] { db.KEY_USER }, new int[] { R.id.txt1 });
        lv.setAdapter(adapter);

I’m using an adapter to connect the text view and the content of the table.

Here is how my Xml looks like”

<?xml version="1.0" encoding="utf-8"?>  
<TextView 
  xmlns:android="http://schemas.android.com/apk/res/android" 
  android:layout_width="fill_parent" 
  android:layout_height="wrap_content" 
  android:id="@+id/txt1"
  android:textSize="20dip" 
  android:padding="8dip" /> 

My question is:

How could I setup icons and colour for every list item that comes connected with my data from DB?

  • 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-22T21:05:00+00:00Added an answer on May 22, 2026 at 9:05 pm

    You might want to consider using android.app.ListActivity. With a list activity you can provide an xml layout to create advanced visuals for your items.

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

Sidebar

Related Questions

I have an Activity in my app that simply displays some results from a
In my Android app, I have some data that needs to be synced daily
I have an Android Activity that displays Google Maps through MapView control and extending
Suppose that, I have an android app that launches browser with some url supplied
I have an app in android that in a different thread from the UI(which
in my android app, I have a button that leads to an activity which
I have an a Java Android app that calls different activities. I thought this
I have some code that gets two Time Picker's content and displays them individually
I have a class that extends android.app.Dialog, the layout is done in an xml
I have an Android project that branched into three different applications, app-1 , app-2

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.