Android: Bold Button Text -


I have a button in my application, but there was something like "Text: Location: Location " in the text is.

I am thinking that it is possible to change the text on the button that " type : location"

means that the button is partly bold? ?

Thanks yoru for advance time.

Simply put strings in the string. XML and replace it like this,

  & lt; String name = "hello" & gt; ; & Lt; P & gt; Hello & lt; / P & gt; World, FH! & Lt; / String & gt;   

and set your button like this

     

Sometimes the above approach will not be useful when you may have to use dynamic text so action is taken in that situation

  string text string = "Copyright"; Button Button = (button) FindById (R.id.button); SpannableString spanString = new SpanLabel string (tempstring); SpanString.setSpan (New Style Span (Typeface.BA), 0, SpanString.line (), 0); Button.setText (spanString);    

Comments

Popular posts from this blog

php - Creating canonical URLs with custom route-classes -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

Mysql Local server hardware -