mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-02-18 04:40:36 +01:00
update the widgets properly
This commit is contained in:
parent
7cace2b5bc
commit
e19a02c017
@ -51,13 +51,17 @@ public class MyWidgetProvider extends AppWidgetProvider implements MyCamera {
|
||||
@Override
|
||||
public void enableFlashlight() {
|
||||
remoteViews.setImageViewResource(R.id.toggle_btn, R.mipmap.flashlight_big_on);
|
||||
widgetManager.updateAppWidget(widgetIds, remoteViews);
|
||||
for (int widgetId : widgetIds) {
|
||||
widgetManager.updateAppWidget(widgetId, remoteViews);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableFlashlight() {
|
||||
remoteViews.setImageViewResource(R.id.toggle_btn, R.mipmap.flashlight_big_off);
|
||||
widgetManager.updateAppWidget(widgetIds, remoteViews);
|
||||
for (int widgetId : widgetIds) {
|
||||
widgetManager.updateAppWidget(widgetId, remoteViews);
|
||||
}
|
||||
cameraImpl.releaseCamera();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user