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


Last Updated:

  1. thuycq84

    thuycq84 New Member This Topic's Starter

    Joined:
    Mar 1, 2010
    Messages:
    2
    Likes Received:
    0
    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

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

    Attached Files:

  3. thuycq84

    thuycq84 New Member This Topic's Starter

    Joined:
    Mar 1, 2010
    Messages:
    2
    Likes Received:
    0
    I understood how to work.
    THANKS Again.
     

Share This Page

Loading...