1. Check out our companion app, Forums for Android! Download from Google Play

How to set Color/Highlight or Change type some texts in a ListView??

Discussion in 'Application Development' started by thuycq84, Mar 1, 2010.

  1. thuycq84

    thuycq84 New Member
    Thread Starter
    5

    Mar 1, 2010
    2
    0
    5
    Hi, guys! Please Help Me !!!
    I intend to build an application for test with a ListView consisting of many text strings mixed:
    "AAA"
    "ANDROID 1"
    "TEST1"
    "ANDROID 2"
    "TEST 2"
    "ANDROID 3"
    "ANDROID 4"
    "ANDROID 5"
    "123"
    ...
    I want to change type of some texts filtered, to make special notes from users. For example, I wanna set to strings start with "TEST" will be RED, and/or strings start with "ANDROID" will be HIGHLIGHT, and/or strings start with a digit number character will be BOLD.

    How can I do?

    THANKS!
     

    Advertisement

  2. jon21569

    jon21569 Member
    16

    Aug 10, 2008
    23
    7
    16
    I have attached a small android program ListViewSample.zip that should show you how to do this.
     

    Attached Files:

  3. thuycq84

    thuycq84 New Member
    Thread Starter
    5

    Mar 1, 2010
    2
    0
    5
    I understood how to work.
    THANKS Again.
     

Share This Page

Loading...