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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:58:03+00:00 2026-06-09T20:58:03+00:00

I have a big image that will be used eventually as an icon for

  • 0

I have a big image that will be used eventually as an icon for an Action bar. So, I would like to reduce its size before that.

How can I do that via XML?

styles.xml:

<style name="AppTheme" parent="android:style/Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/actionBarStyle</item>
</style>

<style name="actionBarStyle" parent="android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">@drawable/shape_gradient_action_bar</item>
    <item name="android:displayOptions">showHome</item>
    <item name="android:icon">@drawable/icon</item>
</style>

icon.xml:

<bitmap xmlns:android="http://schemas.android.com/apk/res/android" 
    android:src="@drawable/ford_dtect_logo_on_white"
    android:width="50dp"    -- Doesn't work
    android:height="50dp" > -- Doesn't work
</bitmap>

Thanks 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-06-09T20:58:04+00:00Added an answer on June 9, 2026 at 8:58 pm

    You cannot. You will have to create the image the size you want it.

    As you can see in the documentation, there are no width or height attributes of any kind.

    One possibility may be to use android:gravity="fill", but I make no guarantees about this working.

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

Sidebar

Related Questions

I have an image that is too big and I want to put it
I have a piece of code that load a very big image in memory.
I have a big <div /> container that has an image as a background.
I'd like a scaleable/flexible fullscreen inline image (no cropping) that will allow for content
I have a function resizePreview() that will resize an image in a jQuery dialog
I have a script that loads big images into the body in this fashion
I have one big buffer image. I want to create another buffer image with
I have a big div with a big background-image. Now I want to create
I have an image on a webpage. It's a pretty big image, however. It's
I have image upload, where I check, how big part of image is already

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.