2
I have in mind the @xml/widget_info
the receiver
in the Manifesto the layout of the widget and the Provider class is what I doubt. What it needs to have?
2
I have in mind the @xml/widget_info
the receiver
in the Manifesto the layout of the widget and the Provider class is what I doubt. What it needs to have?
3
To create a widget on Android you need to:
AndroidManifest.xml
I learned to make widgets by following this tutorial from Vogel, and I used this same article as the basis to answer here for you.
And by answering your questions about widget_info and the receiver, widget_info needs to define the layout the widget will use, the width and height of the widget, and the time rate at which your widget will receive updates, i.e. how much time your receiver will be called. using the example of Vogel, follow the example of widget_info:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/widget_layout"
android:minHeight="72dp"
android:minWidth="300dp"
android:updatePeriodMillis="300000" >
</appwidget-provider>
and on the receiver
, its class that extends the Appwidgetprovider will have a method called onUpdate, this method will be called during the interval that Voce defined in widget_info and in it you can make updates in the widget, such as exchanging an image or text, or any type of update you want to put in the widget.
Browser other questions tagged java android widget
You are not signed in. Login or sign up in order to post.
I’ve followed Vogella but no success ;/
– Pedro Igor