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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:13:42+00:00 2026-06-16T17:13:42+00:00

I am attempting to create buttons with text and a drawableTop. I want the

  • 0

I am attempting to create buttons with text and a drawableTop. I want the drawableTop to be the regular size of the stored image since I have different sizes for different screen sizes. Setting height and width to match_parent seems to be based on the text, and setting them to dip values changes the size of the button, but not the image. I tried scaleX and scaleY, but that changes the size of the text as well, which I don’t want.

I am using the following, but the image appears much smaller than what it is saved as

<Button
    android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label"
android:drawableTop="@drawable/my_image" />

Is there anyway of creating a button with an image that automatically sets to it’s full size?

  • 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-16T17:13:43+00:00Added an answer on June 16, 2026 at 5:13 pm

    You can use a normal ImageView and set an onClickListener or XML onClick property for it.

    If you want different states (e.g. pressed and unpressed) for it you can use a drawable defined in xml to set those.

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

Sidebar

Related Questions

I'm attempting to create a CustomControl which will have various properties affected by an
I am attempting to create a Tab Control Style that basically looks like buttons
I am attempting to create an application which has a edit text view and
I'm new to rails and mongodb, and have a simple form attempting to create
I am attempting to create a simple 3d effect on my nav buttons using
I'm attempting to create a custom button using a background image in Interface Builder.
I am attempting to create my first OS-level GUI using wxPython. I have the
I'm attempting to create a subview inside a regular view. When a button is
I am attempting to write an application in which I have two text fields
I am attempting to create a web form where data from several text box's

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.