Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to display a single text view in different colors

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 166
    Comment on it

    It can be done simply by setting your text as below :-

    textView.setText(Html.fromHtml(getString(R.string.starting_up_message)));
    

    And in your in your string file define that test say like this

    <string name="starting_up_message"><![CDATA[ <b> <font color=#F2F1F0>Get Ready to change the method you ride by joining the best town7lt;/b> <b><font color=#069264>car service]]></string>

    By this the above statement will be set as :

    "Get Ready to change the method you ride by joining the best town" in this color "#F2F1F0" & "car service" in "#069264".

    Try, this surely help you..:)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: