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

  • Home
  • SEARCH
  • 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 6099181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:14:37+00:00 2026-05-23T13:14:37+00:00

Image comments: Icon should go centered in the red bit. The text should go

  • 0

Icon should go centered in the red bit. The text should go centered in the yellow bit.

Image comments: Icon should go centered in the red bit. The text should go centered in the yellow bit.

I’m trying to create a button in android that looks pretty much like the above. I tried with the imagebutton, the normal button (with drawabletop and drawablebottom), but the text is not proper aligned then.

Do note that I prefer not to use shapes, as the final result will be ninepatch images (that come from photoshop). Although feel free an example there for documentation use.

Also note that it needs to be clickable.

I think i just need to create a custom XML for this below, and then somehow have a button make use of this. I just haven’t figured out how/where i need to set the text and so on then.

Any advice on this is appreciated.

  • 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-23T13:14:37+00:00Added an answer on May 23, 2026 at 1:14 pm

    hiii….
    While using Button… you can align your text as per your expectations using android:gravity="center"android:text=”TestHere”`
    Try using this… In my case this works f9… It does or doesn’t help you plz let me know

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a Xml Image Menu that on button click goes
Image a Button on your windows form that does something when being clicked. The
So I am trying to add an icon to an image, once someone has
I have a complex background image and images, that should be on exact positions
I'm trying to use jQuery to show an image that I have set to
I need to read binary PGM image files. Its format: P5 # comments nrows
Image i have a view that is cached with the OutputCache attribute but i
image naturalWidth return zero... that's it, why ? var newimage = new Image(); newimage.src
Is there a way (or an editor) that allows me to link an image/files/http
Can I store large amounts of image files in subversion. My designers usually create

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.