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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:10:24+00:00 2026-06-17T07:10:24+00:00

This is on Jelly Bean, and so the widget can be resizable by the

  • 0

This is on Jelly Bean, and so the widget can be resizable by the user. The only thing in my widget is an Image View. I am creating a bitmap whenever the widget updates which I set into the Image View itself via remote views. The bitmap created and drawn changes depending on the size of the widget, and the space taken up by it.

The problem I have is in determining what size to create the bitmap which I understands must use pixels. Is there a way to find this out from the widget provider? Either the space available in pixels or dips will be fine as I should be able to work it out from one to the other.

  • 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-17T07:10:25+00:00Added an answer on June 17, 2026 at 7:10 am

    The size in dip of a widget can be calculated using the following formula: 70 × n − 30 where n is the number of cells in either width or height.

    You can convert dp values to pixels depending on the screen density.

    Read more at: http://developer.android.com/guide/practices/ui_guidelines/widget_design.html

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

Sidebar

Related Questions

Since Jelly Bean it is possible to set a priority to notifications. This way
Since Android Jelly Bean doesn't support the logs reading permission (according to this google
This class works fine on ICS, but fails with ActivityNotFoundException on Jelly Bean. Do
a user just sent me this screenshot: You can see a settings menu on
Has the Android Stack seen any remarkable updates in Jelly Bean 4.1? I am
Ever since my Asus Transformer tablet was upgraded to Jelly Bean, I find that
Which Android (with Jelly Bean, 4.2) devices support Bluetooth low energy (BLE)? Does Samsung
On my Galaxy Nexus with Jelly Bean 4.1.1 (official) sometimes the OS goes on
I have updated my Google galaxy Nexus (4.0.3 ICS) to Jelly Bean ( offical
I've just tried Android Jelly Bean, and I noticed that the LogCat has changed

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.