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 8157107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:10:00+00:00 2026-06-06T17:10:00+00:00

I have quite a few buttons in my application, they vary in sizes based

  • 0

I have quite a few buttons in my application, they vary in sizes based on the text inside. I want to customize the buttons but I am not sure if I should use

A) Ninepatch pngs

B) Android xml created

C) Photoshop pngs

I want the buttons to scale nicely and therefore not look distorted based on screen size. What are the positives and negatives of the above methods? Is there an ideal way to go about this?

  • 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-06-06T17:10:02+00:00Added an answer on June 6, 2026 at 5:10 pm

    It depends on what they should look like. Rounded corners? Complicated images? Drop shadows? Plain colors?

    If you want simple buttons that are monotone in color, xml drawables are the best solution. You can do rounded corners through xml, so if plain is what you are looking for this is the best option.

    If you are working with an image, then a 9 patch is the way to go. Play around with the draw9patch tool that comes with the sdk to get the hang of it. You also don’t necessarily only need to leave the corners in tack, sometimes you may want to break up the resizable area depending on the image.

    PNGs are the last resort as they are the least flexible of the 3 options.

    By the way, you should also consider using a state list for all of your buttons, regardless of how you implement the drawable that the button uses. See the link below:

    http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

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

Sidebar

Related Questions

A question that seems to have quite a few options for Python, but none
I have tried quite a few codes but none of them seem to work
I have written quite a few Ruby programs, but if I need to show
Done a bit of Googling, but not quite finding what I want. In an
I have added buttons to my expanded notification, there are quite a few. The
I have quite a few places in my iPhone application with a line like
My application has a few portions that have really big buttons (640x130, 230x150, etc.)
We have a page which has quite a few (close to 20) buttons/links that
I have quite a few situations where I have database structures similar to: TABLE
I have quite a few dictionaries where the key is a composite of several

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.