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
0
votes
2 answers

Set android widget visibility dynamycally

Okay i have one EditText and one spinner. My goal is if item 1 on spinner selected the EditText visibility is true, and if item 2 selected EditText visibility is false. what the code for reach that goal ? i use spiner get selected id like this…
user2108272
  • 13
  • 1
  • 1
  • 4
0
votes
1 answer

access resources from another apk for widget (like theme apk)

I made a theme with drawables and strings, I can access the theme's resources by following commands String packagename="com....."; Resources res = context.getPackageManager().getResourcesForApplication(packagename); int strid =…
0
votes
1 answer

problme with updating android appwidget

i have a digital widget clock that works nicely!! but the problem here is that it doesn't update i mean it just shows the time of that moment that i add that to home screen!!! in widget.java: I have an onUpdate like this: Override public void…
Mohsen fallahi
  • 915
  • 1
  • 10
  • 27
0
votes
1 answer

launch update of listview inside appwidget when button is pressed android

I have an appwidget which contains a listview and a buton the listview gives data from remote mysql database mysql and it display it but the button I want to us it to refresh listview from appwidget directly and don't wait for time defined in…
begiPass
  • 2,124
  • 6
  • 36
  • 57
0
votes
2 answers

Access AppWidget even phone is in lock-screen

I am building an android application that when the AppWidget is pressed a number of times, it will send an SMS. The application will run as service, and if the AppWidget is pressed a number of times it will send an SMS alert. Is there any way that…
0
votes
2 answers

Android RemoteViews setViewVisibility not working

I'm dealing with a problem in a home screen widget, and trying to disply or hide buttons according to network availability and state, so if connected, buttons will be displayed and content loaded, and if not connected this will hide all content and…
Houssem
  • 2,069
  • 3
  • 27
  • 42
0
votes
3 answers

Android Clickable AppWidget Disable Sound on Click

I have an AppWidget (part of my app). I want there to be no sound when the user clicks a button in the widget. How do I do this?
0
votes
1 answer

How to handle orientation changes for home screen app widget?

Can anyone help me on how to handle orientation change for app widget? On orientation change my widget is showing layout with empty view and removing all listeners.
Handroid
  • 399
  • 1
  • 2
  • 13
0
votes
2 answers

Need help about a widget

This is a battery widget. This is not my code but taken from http://www.cmwmobile.com/index.php?option=com_content&view=article&id=56&Itemid=68. private final BroadcastReceiver batteryChangedReceiver = new BroadcastReceiver() { …
0
votes
1 answer

Why widget doesn't update?

I can't update the widget when is in charging state. The battery level stay the same. What is wrong in my code? public class BatteryStatusWidgetActivity extends AppWidgetProvider { /** Called when the activity is first created. */ private…
David_D
  • 1,404
  • 4
  • 31
  • 65
0
votes
1 answer

Appwidget with collection. Illegal working

I have appwidget with listview. Some information we can see here 1) This widget don't worked on 2.x. But user on this devices see this widget at his list and can move it at screen. After he get error. Can I any way to hide this widget on 2.x?…
Yura Shinkarev
  • 5,134
  • 7
  • 34
  • 57
0
votes
1 answer

Illegal state on click imageview with background (selector)

I have appwidget with collection (listview). Source widget xml layout:
Yura Shinkarev
  • 5,134
  • 7
  • 34
  • 57
0
votes
1 answer

Some appwidgets won't update?

I am writing a launcher activity to host appwidgets. Basically here is what I am doing. My container view for all appwidgets is some customized ViewGroup. When adding widgets, I do call config activity first for the widget being added. I am calling…
Farmer
  • 53
  • 1
  • 6
0
votes
2 answers

Using different app widget layouts depending on the API level

When using Activities you can easily select the layout to be used as you wish in the onCreate() via setContentView(). But how do I accomplish this on an app widget? As far as I know the app widget's layout is determined by the corresponding…
wodzu
  • 3,004
  • 3
  • 25
  • 41
0
votes
0 answers

Synchronizing app widget's layout with another dynamically created layout

I have a Fragment within my Activity which is created dynamically from an almost blank layout.xml, which only holds a LinearLayout and a RelativeLayout. Their contents are created at runtime on the user's behalf. I'd like to synchronize my app…
wodzu
  • 3,004
  • 3
  • 25
  • 41