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

How to bold a word in the content

Discussion in 'Application Development' started by cb03, May 23, 2010.

  1. cb03

    cb03 Member
    Thread Starter
    5

    Apr 27, 2010
    6
    0
    5
    Suppose I have a Textview and I want to bold the word I want in the content, so How can I do that????????
    Anybody help????????/
    thanks!
     

    Advertisement

  2. orangic

    orangic Member
    6

    May 23, 2010
    6
    1
    6
    Try this:

    Code (Text):
    1.  
    2. TextView textView = (TextView)findViewById(R.id.textView);
    3. textView.setText(Html.fromHtml("<b>Bold</b> Text"));
    4.  
     
  3. cb03

    cb03 Member
    Thread Starter
    5

    Apr 27, 2010
    6
    0
    5
    I try that code but the content of textview changed. I don't want it's change. I just want to bold a word in the content. For example, I have a textview with the content :
    "I want to bold this word"
    and I want it's will appearance :
    "I want to bold this word"


    Can u help me??????????
     

Share This Page

Loading...