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

  • Home
  • SEARCH
  • 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 6376589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:45:53+00:00 2026-05-25T01:45:53+00:00

I have a widget that gets updated when I press it, but I would

  • 0

I have a widget that gets updated when I press it, but I would like to show a progress wheel while the widget gets updated.

//remove text      
        updateViews.setViewVisibility(R.id.widget_textview, View.GONE);
        updateViews.setViewVisibility(R.id.widget_dkk, View.GONE);

// show progress wheel

updateViews.setViewVisibility(R.id.widget_Pross, View.VISIBLE);



// task that take time are locatet here a GetHTTP function



//Show text again       
        updateViews.setViewVisibility(R.id.widget_textview, View.VISIBLE);
        updateViews.setViewVisibility(R.id.widget_dkk, View.VISIBLE);

// Remove progress wheel

   updateViews.setViewVisibility(R.id.widget_Pross, View.GONE);

ALL this are locatet this in my widget update class:

public static RemoteViews buildUpdate(Context context) {

But the progress wheel does not show. It’s like the widget only get updated one time, and thereby not showing the progress wheel while computing in the GetHttp.

EDIT:

// Remove rext and show progress wheel
    updateViews.setViewVisibility(R.id.widget_textview, View.GONE);
        updateViews.setViewVisibility(R.id.widget_dkk, View.GONE);
        updateViews.setViewVisibility(R.id.widget_Pross, View.VISIBLE);

    ComponentName thisWidget = new ComponentName(context, SaldoWidget.class);
    AppWidgetManager manager = AppWidgetManager.getInstance(context);
    manager.updateAppWidget(thisWidget, updateViews);


//    GetHttp code here / long computing task her

 //Show text and remove progress wheel 
 updateViews.setViewVisibility(R.id.widget_textview, View.VISIBLE);
            updateViews.setViewVisibility(R.id.widget_dkk, View.VISIBLE);
            updateViews.setViewVisibility(R.id.widget_Pross, View.GONE);
            manager.updateAppWidget(thisWidget, updateViews);
  • 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-25T01:45:54+00:00Added an answer on May 25, 2026 at 1:45 am

    You have to call AppWidgetManager.updateAppWidget() every time you want to change the layout.

    That means you have to hide the original widget views and show the progressbar in your RemoteViews. After that, call updateAppWidget() to change the layout and display the progressbar. Then execute your downloadtask. After that, populate the views with the fetched data, hide the progress indicator and call updateAppWidget() again to change it back to the normal layout.

    The name RemoteViews may make this a bit confusing at the start. It’s actually not a bunch of Views that you can control remotely from your app. It’s a group of views that you build up to your needs and then you give it to the AppWidgetManager to publish it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this widget in android, that displays an image and gets updated periodically
Hi I have text editor widget in smalltalk (visual works) that returns a text
I have a selectmultiple choice widget that gets data from mysql database and displays
I have a widget that acts as a launcher on the home screen. How
I have a widget that supposed to call an Activity of the main app
Let's say that I have a widget that displays summary information about how many
I have a UI widget that needs to be put in an IFRAME both
I have a JavaScript widget that is hosted on websites. This widget tracks state
I have a TextEdit widget in PyQt that I use to print out a
We have a UI widget on our main UI that uses JavaScript to respond

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.