mcmt: updateWidget

zhengkunpeng_branch
zkp 2 years ago
parent f413599ba6
commit 95853119b6

@ -423,6 +423,13 @@ public class NoteEditActivity extends Activity implements OnClickListener,
clearSettingState();
}
/**
* @method updateWidget
* @description
* @date: 2023-12-18 21:37
* @author:
* @return void
*/
private void updateWidget() {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
if (mWorkingNote.getWidgetType() == Notes.TYPE_WIDGET_2X) {

@ -686,8 +686,17 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
}
}
/**
* @method updateWidget
* @description
* @date: 2023-12-18 21:37
* @author:
* @return void
*/
private void updateWidget(int appWidgetId, int appWidgetType) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
// 根据不同大小类型的widget更新Widget
// 2023-12-18 21:41
if (appWidgetType == Notes.TYPE_WIDGET_2X) {
intent.setClass(this, NoteWidgetProvider_2x.class);
} else if (appWidgetType == Notes.TYPE_WIDGET_4X) {

Loading…
Cancel
Save