Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android widget not showing up on the list after developed

Tags:

I'm upgrading my app with widget. It's not the first widget I've done. I was always encountering weird issues, but the widget was shwoing up on the list eventually.

Here is what I've done so far:

  • Created widget_layout.xml
  • Created widget_info.xml
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"       android:minWidth="110dp"     android:minHeight="30dp"     android:updatePeriodMillis="86400000"     android:initialLayout="@layout/widget_layout"     android:resizeMode="none"> </appwidget-provider> 
  • Created WidgetProvider class
  • Added widget to manifest in the <application> section (for some reason can't paste manifest fragment here, it's just not showing, see the code here)

Still, can't find widget on the widgets list. I'm debugging the app on real device. I'm using library project, but the widget files but all in the project I run directly. What could be happening here?

like image 837
Jacek Kwiecień Avatar asked Apr 11 '13 12:04

Jacek Kwiecień


People also ask

Why are my widgets not showing up Android?

Long-press a widget or the app corresponding to the widget. Tap on App Info and select Storage & cache from the options. Try clearing the cache first and see if it fixes the issue. If not, clear the app data as well.

Why wont my widgets show up?

Open “Settings“. Select “Apps” or “Applications“. One some devices, choose “Manage applications“. Select the menu icon or “More” option at the upper-right corner of the screen, then choose “Show system“.

How do I get my widgets back on my Android?

Add a widgetOn a Home screen, touch and hold an empty space. Tap Widgets . Touch and hold a widget. You'll get images of your Home screens.

Where did my widgets go?

The most common reason for a widget to disappear is when Android users transfer applications to a memory card. Widgets may also disappear after the hard reboot of your device. To return it, you need to transfer them again to the phone's memory.


1 Answers

Ran across similar issues and this is what happened for me. The below Widget never showed up in the Widget drawer till minResizeHeight was added. Weird, but may be that is required for resizable widget. Could have been more friendly.

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:initialLayout="@layout/pmt_schedule_scroll_widget" android:minHeight="146dip" android:minResizeHeight="73dp" android:minWidth="146dip" android:resizeMode="vertical" android:updatePeriodMillis="0" /> 
like image 72
sivag1 Avatar answered Oct 19 '22 23:10

sivag1