jimmy Posted August 21, 2010 Share Posted August 21, 2010 Bonjour, Je cherche a changer la couleur de fond de mon widget dynamiquement mais je n'ai réussi qu'avec android 2.2 avec ceci RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.widgetlayout); updateViews.setInt(R.id.layout_linear, "setBackgroundColor", color_background); Le problème est que de 1.6 a 2.1 cela ne fonctionne pas j'ai : updateAppWidget couldn't find any view, using error view android.widget.RemoteViews$ActionException: view: android.widget.LinearLayout can't use method with RemoteViews: setBackgroundColor(int) Y a t'il une solution pour changer le fond de mon widget? Ou plus généralement comment récupéré un élément de mon widget afin d'appliquer directement les modifications, un genre de findViewById pour les widgets. Merci pour votre aide. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.