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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:02:16+00:00 2026-05-19T02:02:16+00:00

I am creating a widget and I want to be able to have the

  • 0

I am creating a widget and I want to be able to have the user select the size of the widget in a menu during the configuration activity. My problem is that in the appwidget-provider meta data xml, the block size is already set before the configuration activity is already entered. I need to be able to reset the info of the widget, which contains the block size (minHeight, minWidth), without having to add separate widgets of different sizes. Any ideas?

  • 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-19T02:02:16+00:00Added an answer on May 19, 2026 at 2:02 am

    You cannot do this. It is an Android limitation. Create several widgets with different sizes, name them like “YourWidget (small)”, “YourWidget (large)”, etc. Or “YourWidget 1×1” and “YourWidget 2×1”. You’ll need several nearly identical appwidget-provider xml…

    Since you’ll need also nearly identical provider and configuration classes, define a base classes with all needed code there, and then inherit from them, something like this:

    public class WidgetProvider2x1 extends WidgetProvider {
    @Override
    int getWidgetStyle() {
    return WidgetProvider.WIDGET_STYLE_2x1;
    }}

    call getWidgetStyle() in the base class when you need to know the size of your widget.

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

Sidebar

Related Questions

For a widget I am creating for the Android OS, I want the user
I'm creating an Android widget that I want to update every night at midnight.
I am creating a widget, and I want that in the launcher, the preview
I am creating a widget and had successfully created it, what I want to
We want to use Orchard for a website. We are creating a custom module/widget
I have a JavaScript widget which communicates with my Rails app by creating tags
I am looking at creating a page that the user can move around as
I have three images that I would like to join in a widget I'm
I want to have a list of items that need to be processed in
i have problem when i want to get id in li element and stored

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.