Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6391511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:40:49+00:00 2026-05-25T03:40:49+00:00

I have a button in my application. the text in the button goes as

  • 0

I have a button in my application. the text in the button goes as “Type: Location” something like that.

I’m wondering whether its possible to change the text on the button as “Type: Location”

i.e Bold the text partially on the button??

Thanks for yoru time in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:40:50+00:00Added an answer on May 25, 2026 at 3:40 am

    Simply put your string in strings.xml and change it like this,

     <string name="hello"><b>Hello</b> World, fh!</string>
    

    and set this text to your button like this

    <Button
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:textAllCaps="false"
        android:text="@string/hello"
        />
    

    Sometimes the above approach will not be helpful when you might have to use Dynamic Text. So at that case SpannableString comes into action.

      String tempString="Copyright";
      Button button=(Button)findViewById(R.id.button);
      SpannableString spanString = new SpannableString(tempString);
      spanString.setSpan(new StyleSpan(Typeface.BOLD), 0, spanString.length(), 0);
      button.setText(spanString);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a button in my obj-c application that I would like to launch
In my hello world application, i have a button and a text field set
I have a button on an ASP.NET wep application form and when clicked goes
I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is
I have a button that changes the text inside in it when clicked. <Button
In my application I have a Submit button that does this: private void Submit_button_Click(object
My Application have 5 activities(A1,A2,A3,A4,A5). Each activity have one text view and one button(B1,B2,B3,B4,B5).
Here's my problem: I have a button in my android application that when I
I wonder if it is possible to have a button in application settings just
I have application that have button i want when click this button every 1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.