添加文档和注释

main
任柯敏 2 months ago
parent 03e0730e44
commit 5be778c8f2

@ -23,24 +23,50 @@ import net.micode.notes.R;
import net.micode.notes.data.Notes;
import net.micode.notes.tool.ResourceParser;
/**
* 4x 便
* NoteWidgetProvider 4x
*/
public class NoteWidgetProvider_4x extends NoteWidgetProvider {
/**
*
*
* @param context
* @param appWidgetManager AppWidget
* @param appWidgetIds ID
*/
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
// 调用父类的更新方法处理小部件更新逻辑
super.update(context, appWidgetManager, appWidgetIds);
}
/**
* 4x 使ID
* @Override
* @return ID
*/
protected int getLayoutId() {
return R.layout.widget_4x;
}
/**
* ID 4x
* @param bgId ID
* @return ID
*/
@Override
protected int getBgResourceId(int bgId) {
// 使用资源解析器获取对应4x小部件的背景资源
return ResourceParser.WidgetBgResources.getWidget4xBgResource(bgId);
}
/**
*
* @return 4x
*/
@Override
protected int getWidgetType() {
return Notes.TYPE_WIDGET_4X;
}
}
}
Loading…
Cancel
Save