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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:12:44+00:00 2026-05-29T11:12:44+00:00

my appwidget is defined with the following widget-provider-info <?xml version=1.0 encoding=utf-8?> <appwidget-provider xmlns:android=http://schemas.android.com/apk/res/android android:configure=de.firepower.andwol.widget.AndWOLWidgetConfigure

  • 0

my appwidget is defined with the following widget-provider-info

<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:configure="de.firepower.andwol.widget.AndWOLWidgetConfigure"
    android:initialLayout="@layout/widget"
    android:minHeight="72dp"
    android:minWidth="72dp"
    android:previewImage="@drawable/icon"
    android:resizeMode="horizontal|vertical"
    android:updatePeriodMillis="180000" >

</appwidget-provider>

and the following layout…

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="@dimen/widget_margin" android:orientation="vertical" android:background="@drawable/appwidget_dark_bg">
    <ImageButton
        android:id="@+id/widgetbutton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:src="@drawable/icon"
        android:scaleType="fitCenter"
        android:contentDescription="@string/cd_wake_host">
    </ImageButton>
    <TextView
        android:id="@+id/widgettext"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:text="@string/placeholder_hostname" android:textSize="8dp"
        android:layout_marginBottom="2dp"/>
</LinearLayout>

I thought it should take 1×1 square but it takes 2×2 squares and I don’t know why. I could only get it to take 1×1 if I define minHeight and Width lower than 60dp in Widget-Provider-Info.
Does anyone know/see what I’m doing wrong?

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-05-29T11:12:45+00:00Added an answer on May 29, 2026 at 11:12 am

    Take a look here:
    http://developer.android.com/guide/practices/ui_guidelines/widget_design.html#anatomy_determining_size

    To get a widget with a 1×1 cell size you need to set your size to round 40dp in height and width.

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

Sidebar

Related Questions

The tutorial says to use android.appwidget.action.APPWIDGET_UPDATE in the action element within the XML intent-filter
I'm trying to create a menu in Qt following this example http://doc.qt.nokia.com/latest/mainwindows-menus.html but I
I have created an App Widget for Android 1.5. It uses a TextView to
Is there any way to play video in Android App widget.
In an appwidget in android, is there a way to set multiple pending intents
I have an Android widget that has a configure activity. I also have an
I have a appwidget extends from appwidgetprovider. I have created a layout xml file
I'm working off this tutorial: http://www.developer.com/ws/article.php/10927_3833306_2/Creating-a-Home-Screen-App-Widget-on-Android.htm It includes the following code: widgetUpdate.setData( Uri.withAppendedPath(Uri.parse( ImagesWidgetProvider.URI_SCHEME
I have defined an App Widget ( AppWidgetProvider , etc.), and I want to
I am looking at ways to automate testing of an Android app widget. Part

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.