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
3
votes
1 answer

Bitmap in notification remoteviews cannot recycle

I want to write mp3 player app. show music album on notification Here is the code: mCoverBitmap = MusicModel.getAlbumArt(musicItem.getUri()); if (mCoverBitmap != null) { mNormalRemoteViews.setImageViewBitmap(R.id.notification_image,…
Shaw
  • 1,445
  • 16
  • 21
3
votes
0 answers

Editing layout_height programmatically for remoteViews

I need to change layout_height for my app widget when the font size is changed. Since it's a widget, it works with remoteViews. I'm setting textSize like this: protected void setWidgetTextViewSize(float textViewSize) { if (Build.VERSION.SDK_INT…
3
votes
0 answers

Android widget becomes unresponsive after random amounts of time pass

My assumption is that I just do not fully understand widgets yet. Hopefully one of you guru's can see where my logic/thinking is flawed. Ultimately what happens with my widget is that it eventually becomes unresponsive at very random intervals…
tronious
  • 1,547
  • 2
  • 28
  • 45
3
votes
1 answer

RemoteViews method names

I am creating an App which uses some widgets and I use setInt() method on a remoteView for changing the background source. That´s not a problem, but I wonder where the documentation about the method names is. In the RemoteViews API it is not…
Opiatefuchs
  • 9,800
  • 2
  • 36
  • 49
3
votes
2 answers

Android: update specific notification from multiple notifications which have remoteview

I am creating application that contain notification which have play/pause icon , which. it works perfect when there have just only one notification which have just one notification id, it change play/pause icon through only one notificationid, but…
Mayur Raval
  • 3,250
  • 6
  • 34
  • 57
3
votes
1 answer

Get TextView from RemoteViews to make its text scrollable

I have a notification built with a RemoteView from a service. The RemoteView layout contains a TextView that I want to have it scrolling. I've set it up as marquee in the xml, all good. But now I need to set textView.setSelected(true) therefore I…
KKO
  • 1,913
  • 3
  • 27
  • 35
3
votes
1 answer

set initial scroll position of an Android widget

I have a collection based widget and I would like to change the initial scroll position. I've tried following in my RemoteViewsFactory.. views.setScrollPosition(R.id.widgetList, myDesiredPosition); …
simekadam
  • 7,334
  • 11
  • 56
  • 79
3
votes
3 answers

Apply style to a RemoteView?

I use two applications. One exposes a RemoteView via an AIDL interface. The second uses a ListView and custom adapter to present the RemoteView. With a very simple view with one layout and one TextView, the TextView is white in the Listview. All…
Philippe Prados
  • 461
  • 3
  • 12
3
votes
2 answers

setImageViewUri from URL on remote view in android widget

I try to set image from url with remote view. Here is the code that i use : rv = new RemoteViews(mContext.getPackageName(), R.layout.widget_item_default); WidgetItem item = mWidgetItems.get(position); rv.setImageViewUri(R.id.imageDeal,…
Wawanopoulos Ertz
  • 135
  • 1
  • 2
  • 7
3
votes
1 answer

App Widget Update Headaches: Failed Binder Transaction, RemoteViews, setImageURI, and orientation changes

I am having an issue with updating AppWidgets and a confluence of limitations/bugs in android is preventing me finding a workaround. My app widget is themeable so I need to be able to update the imageviews on it at runtime (as well as the textviews…
3
votes
5 answers

Retain image aspect ratio in app widget GridView

I'm working on an application that has several application widgets, and some of them are using a GridView to display their content. The content is a bunch of movie cover art images, and I'd like to retain the original aspect ratio of the…
Michell Bak
  • 13,182
  • 11
  • 64
  • 121
3
votes
0 answers

Disable list item in App Widget

Is it possible to have some items disabled in a list view in an app widget on the home screen? Right now I'm using a PendingIntent template for the list view and then I fill in the intents for each row with an fillIntent. What I'm trying to do is to…
Daverix
  • 399
  • 2
  • 16
3
votes
2 answers

update textView in a widget

I've read a lot of Q&As but I couldn't find my answer. May be something in my implementation is wrong. The problem is that my TextView in the widget doesn't get updated. The logic is this: 1.setOnClickPendingIntent on a specific button in the…
SAbbasizadeh
  • 730
  • 10
  • 25
2
votes
1 answer

How to handle widgets buttons

I'm starting with widgets and got a very nice tutorial on the internet, got the example run perfectly, but when i tried to change somethings I got stuck. The thing is: I just want to change the image from my imageButton when i press it, I've tried…
Markissimo
  • 309
  • 2
  • 9
  • 23
2
votes
2 answers

Widget that contains image with rounded corners

How to make a Material You-like widget with image whose corners are rounded? It is already made in Google Photo, but how to get the same effect? Many ways (like ShapeableImageView) are forbidden and impossible to bypass due to restrictions of…
Vreny
  • 71
  • 7