Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6669945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:12:38+00:00 2026-05-26T03:12:38+00:00

In my onUpdate method in my AppWidgetProvider class, I ended up executing a non-trivial

  • 0

In my onUpdate method in my AppWidgetProvider class, I ended up executing a non-trivial amount of code so that I can completely recreate a new RemoteView object. The reality is I really only need to be setting the text in one of the TextViews in the RemoteViews each time I update.

Is there any way to just modify the RemoteViews that a particular widget is already using?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:12:38+00:00Added an answer on May 26, 2026 at 3:12 am

    First, RemoteView is not a View. It’s a set of instructions that build a View hierarchy. It is used to recreate a View in another process (App Widgets do not execute in your app’s process). As such it’s serializable and mutable.

    So, when you initialize a RemoteView just store a reference to it somewhere, e.g. in a field of your custom AppWidgetProvider.
    Next time you need it, get it from field and the change something on it. For changing the string in a TextView use setString(..).

    remoteView.setString(textViewId, "setText", "some text for TextView")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code in my AppWidgetProvider class. @Override public void onUpdate(Context context,
The method onCreate(Bundle) is undefined for the type AppWidgetProvider public class SupermarioActivity<imageButton1> extends AppWidgetProvider
As I know there are two types of calling AppWidgetProvider's onUpdate() method: when updatePeriodMillis
Look at code below I need to update this onUpdate method every second, could
NHibernate_reference.pdf, page 26: Note that ILifecycle.OnUpdate() is not called every time the object's persistent
As we Android developers know, the SQLiteDatabase execSQL method can execute only one statement.
There is no setBackground() method in the RemoteViews class, so I've used the following
My AutoCompleteTextField (getChoices method implemented and working): AutoCompleteTextField<String> objectDescription = new AutoCompleteTextField<String>(objectDescription) { getChoices()
I have a base class Foo that has an Update() function, which I want
I am a new android developer trying to code a widget.. The updatePeriodMillis parameter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.