Questions tagged [remoteview]

A class specific to Android that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.

A RemoteView is a class specific to Android that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the content of the inflated hierarchy.

This is specific to Android, this tag should be typed as per the Android Tag Info.

331 questions
2
votes
0 answers

Android remote view display images from the web?

Does any know of a tutorial or something similar to help create a Remote View wigdet like this... I followed through the development guide on doing StackView widget. I did it but i dont know how to display images in the Stack like the example news…
coder_For_Life22
  • 26,645
  • 20
  • 86
  • 118
2
votes
1 answer

Android - AppWidget AppWidgetManager.updateAppWidget() not being called instantly

I am developing an appwidget that uses the RemoteViews to display a ListView. For simplicity's sake, I will give an analogy of the appwidget's functionality: The user will select to add the appwidget to the home screen. Upon selecting the widget,…
icecreamman
  • 611
  • 1
  • 5
  • 19
2
votes
0 answers

How to change custom notification background color (Oreo and above)?

I'm trying to set background color (white) to my custom notification view, but on android X notification comes with black background. Below is my code to generate notification: context?.let { val notificationLayout =…
Rimsha Butt
  • 115
  • 8
2
votes
1 answer

Why is setOnClickPendingIntent not working?

I am attaching a pending intent to a widget button via .setOnClickPendingIntent and getting no response from it when the button is clicked. Oddly enough, when I implement this same code in my download service, it wants to work (but won't because the…
2
votes
0 answers

How to properly update a collection in a widget UI on Android 8.0 (API level 26+)?

The story so far: I have two Android Home Screen widgets to mainain and I recently updated the host App to support Android 8.0 (targetSdkVersion 26). Obviously, the long-running services, which were used to update the widgets, got killed by the…
2
votes
3 answers

Android app widgets background shape change color opacity programmatically

I have developed an app widget with round corners. I've basically set a background drawable to the root of the app widget layout. Now I'm trying to change its background opacity without losing round corners. I know that RemoteViews are pretty…
Luca
  • 322
  • 4
  • 19
2
votes
1 answer

Same widgets with different ListView data

I have a simple AppWidget that has ListView. The widget have simple config Activity, where you select which set of data you want to display. That info (int id) is stored into SharedPreferences and later get from SP in RemoteViewsFactory. All is…
Sheler
  • 3,969
  • 3
  • 12
  • 21
2
votes
1 answer
2
votes
0 answers

onClick of background of RemoteView unecpected behaviour

I want my widget to show a list with a clickable button and clickable background on the ListItem that contains the button. I created a service, that distinguishes between the different events, but the click on the background is never registered, if…
leonardkraemer
  • 6,573
  • 1
  • 31
  • 54
2
votes
1 answer

Use RatingBar in notification

I am developing an app in which user can give reviews and I am pushing notification to that user to whom review is posted. Now I have a requirement from client to show the rating in the notification I have searched about it and found this solution…
2
votes
3 answers

RemoteViewsService not called

I'm currently trying to add a ListView to my widget. Sadly, my RemoteViewsService does not get called. Here's my widget refresh code : RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_today_layout); Intent intent = new…
Skyost
  • 1,429
  • 1
  • 16
  • 31
2
votes
2 answers

android textclock set fontfamily not work

i read this page https://developer.android.com/preview/features/fonts-in-xml.html textview is ok ,but textclock is not work.
kai hello
  • 135
  • 1
  • 2
  • 13
2
votes
0 answers

Refresh Text in Notification (Remote View) Using Broadcast Receiver

I have looked all around and can not find a way to overwrite an existing Remote View TextView using a Broadcast Receiver. I'm trying to get the Remote View inside my MainActivity and update it with a new value to be displayed inside the notification…
2
votes
0 answers

Onclick of button in custom notification not working

I have a pause button in my notification, on click of which should go to the broadcast receiver. The following is my code: NotificationCompat.Builder builder = new NotificationCompat.Builder(WalkTrackingActivity.this); remoteViews = new…
2
votes
2 answers

Android - Play/Pause Update RemoteViews in Notification

I'm trying to implement play/pause button in notification via frame layout but when I click to pause the mediaPlayer it doesn't updates to show the play button in the notification.How to update the view? RemoteViews nv = new…
zek54
  • 415
  • 3
  • 20