Is there any way to change the color of the ProgressBar
residing in the app widget at runtime?
This is how the ProgressBar
progress value is updated:
RemoteViews views = new RemoteViews( context.getPackageName(), R.layout.widget );
views.setProgressBar( R.id.progressbar, 100, 10, false );
...
appWidgetManager.updateAppWidget( widgetID, views );
Unfortunately, the RemoteViews
class does not allow us to set a color filter or even a different progress drawable for ProgressBar
.
Any ideas would be appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…