Questions tagged [android-appwidget]

Android App Widgets are custom views that can be placed on the home screen of an Android device.

Android App Widgets are custom views that can be placed on the homescreen of an Android device.

Useful links

992 questions
6
votes
1 answer

ViewFlipper inside Remoteview showNext() and showPrevious() not working

I am working in a project where I need to use ViewFlipper view inside Remoteview in Notification bar. Currently am facing issue with a showNext() and showPreview(). But unfortunately showNext() and showPreview() are not called when I call the…
6
votes
3 answers

Android appwidget not showing

Looked like my #$#%$%#$ the receiver was not i application element in manifest Hi I just created the helloworld appwidget to see how its works. i followed the dev example on adroid dev site. But for some reason the widget does not want to show in…
Pintac
  • 1,565
  • 3
  • 21
  • 38
6
votes
1 answer

Is it safe to rely on the call to onDataSetChanged() after onCreated() in RemoteViewsFactory of an AppWidget

I developed my AppWidget according to the android doc, loading my cursor in onCreate() and reloading it in onDataSetChanged(), and everything worked fine, until I set some breakpoints in my RemoteViewsService.RemoteViewsFactory and surprisingly…
Hai Zhang
  • 5,574
  • 1
  • 44
  • 51
6
votes
1 answer

Android app widget listview onclick listener

I am new to android development. I am trying to make a widget for my app which will contain a listview, with each listview having 2 buttons apart from heading and content. I am trying to hide the corresponding element of the listitem in the app…
ashutosh
  • 1,192
  • 5
  • 22
  • 46
6
votes
1 answer

RemoteViewsFactory grantUriPermission to fetch data

have an AppWidget with a Listview that I want to populate with a RemoteViewsService.RemoteViewsFactory. I have the following error E/AndroidRuntime(1203): java.lang.SecurityException: Permission Denial: reading com.crbin1.myapp.data.ProviderLTD…
crbin1
  • 2,219
  • 3
  • 22
  • 29
6
votes
1 answer

How Do I Properly Update AppWidget?

I'm a noob to android and I'm having issues updating an appwidget. It's a news widget that displays different text every 20 secs. I have no problem getting the text to switch & display properly when the widget is initialized. However, after…
B. Money
  • 931
  • 2
  • 19
  • 56
6
votes
2 answers

Appwidget Maximum Width that fits all screen sizes

I am currently developing an appwidget and unfortunately it does not fits in phone with bigger screen sizes. How can I ensure that the appwidget has full width for all types of phones? At first I thought this could be done by using…
Annonymous
  • 83
  • 1
  • 8
6
votes
0 answers

Android AppWidgetManager method getAppWidgetIds returning empty array

My app updates within a service, and first does this to get the widget's id: AppWidgetManager widgetManager = AppWidgetManager.getInstance(this); int[] widgetIds = widgetManager.getAppWidgetIds(new ComponentName(this,…
JMRboosties
  • 15,500
  • 20
  • 76
  • 116
6
votes
4 answers

How to resize text size depending on widget size in a textview in an appwidget?

I've programmed Android for a while, but this really puzzles me. So I have a simple appwidget with a textview. I simply want the text font size inside that textview to scale up/down if the user resizes the widget so as to make the text larger if the…
zaifrun
  • 931
  • 9
  • 21
6
votes
2 answers

What sizes to use for a 4x2 appwidget

I'm trying to create an appwidget that has a standard size of 4x2 tiles. Currently, I'm using these values: android:minHeight="146dp" android:minWidth="294dp" On my Desire running Gingerbread, the widget shows as 4x2. On my Asus TF101 tablet…
nhaarman
  • 98,571
  • 55
  • 246
  • 278
6
votes
1 answer

Moving AppWidgetProvider under different Package name breaks active widgets

I have an AppWidgetProvider under package "com.developer.application" I tried moving this AppWidgetProvider under package "com.developer.application.widgets" Upon doing so I updated all references in the AndroidManifest to accommodate the…
5
votes
1 answer

Android AppWidget Not Displaying On Certain Phones

I have a really simple appwidget (two text views and a button). I've tested it on a Touchpad, Droid 1, and a Droid Razr. It works on everything except the Razr. When I add the widget to the homescreen it doesn't display; it's just invisible. If I…
Eliezer
  • 7,209
  • 12
  • 56
  • 103
5
votes
1 answer

Is it possible to reuse RemoteViews in an appWidget instead of creating new ones every time? and how can I store them?

In my appWidgetProvider, every time I need to update an appWidget I have to create new RemoteViews object and assign it's properties: RemoteViews views = new…
GalDude33
  • 7,071
  • 1
  • 28
  • 38
5
votes
4 answers

Update app widget on click in android

I am working on Android Widget my widget is like following diagram, [prev] event name [next] prev, next are the buttons on the widget.So i want to update the event name on click of next and prev button.On start of the service i loaded the data and…
VK.Dev
  • 801
  • 4
  • 11
  • 24
5
votes
2 answers

How to change 'android:autoStart' attribute of ViewFlipper in RemoteViews programmatically?

I am building an appWidget that has multiple views and flips the views. Basically, it's working. But I have no idea how I can stop view flipping in RemoteViews programmatically. this is xml layout for flipping
juniano
  • 354
  • 4
  • 13