branch01
chenwenjie 8 months ago
parent 71a040a758
commit f35b9b0271

@ -16,18 +16,31 @@
package net.micode.notes.gtask.exception;
// 自定义异常类,表示操作失败
public class ActionFailureException extends RuntimeException {
private static final long serialVersionUID = 4425249765923293627L;
// 无参构造函数
public ActionFailureException() {
super();
}
// 带有错误信息的构造函数
public ActionFailureException(String paramString) {
super(paramString);
}
// 带有错误信息和原因的构造函数
public ActionFailureException(String paramString, Throwable paramThrowable) {
super(paramString, paramThrowable);
}
}
/*
*
* Java ActionFailureException RuntimeException
ActionFailureException
serialVersionUIDUID
ActionFailureException()
ActionFailureException(String paramString)
ActionFailureException(String paramString, Throwable paramThrowable)*/

@ -16,18 +16,30 @@
package net.micode.notes.gtask.exception;
// 自定义异常类,表示网络操作失败
public class NetworkFailureException extends Exception {
private static final long serialVersionUID = 2107610287180234136L;
// 无参构造函数
public NetworkFailureException() {
super();
}
// 带有错误信息的构造函数
public NetworkFailureException(String paramString) {
super(paramString);
}
// 带有错误信息和原因的构造函数
public NetworkFailureException(String paramString, Throwable paramThrowable) {
super(paramString, paramThrowable);
}
}
/*
* Java NetworkFailureException Exception
NetworkFailureException
serialVersionUIDUID
NetworkFailureException()
NetworkFailureException(String paramString)
NetworkFailureException(String paramString, Throwable paramThrowable)*/

@ -140,3 +140,13 @@ public abstract class NoteWidgetProvider extends AppWidgetProvider {
// 获取小部件类型的抽象方法
protected abstract int getWidgetType();
}
/*
* Java NoteWidgetProvider AppWidgetProvider
NoteWidgetProvider便
PROJECTION
COLUMN_IDCOLUMN_BG_COLOR_IDCOLUMN_SNIPPET
onDeleted
getNoteWidgetInfo
update
getBgResourceIdgetLayoutIdgetWidgetTypeIDID*/

@ -24,24 +24,38 @@ import net.micode.notes.data.Notes;
import net.micode.notes.tool.ResourceParser;
// 便签小部件提供程序用于2x大小的小部件
public class NoteWidgetProvider_2x extends NoteWidgetProvider {
// 当小部件更新时调用
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
super.update(context, appWidgetManager, appWidgetIds);
}
// 获取小部件布局ID
@Override
protected int getLayoutId() {
return R.layout.widget_2x;
}
// 获取小部件背景资源ID
@Override
protected int getBgResourceId(int bgId) {
return ResourceParser.WidgetBgResources.getWidget2xBgResource(bgId);
}
// 获取小部件类型
@Override
protected int getWidgetType() {
return Notes.TYPE_WIDGET_2X;
}
}
/*Java NoteWidgetProvider_2x NoteWidgetProvider
NoteWidgetProvider_2x便2x
onUpdate
getLayoutId ID
getBgResourceId ID
getWidgetType
*/

@ -24,23 +24,38 @@ import net.micode.notes.data.Notes;
import net.micode.notes.tool.ResourceParser;
// 便签小部件提供程序用于4x大小的小部件
public class NoteWidgetProvider_4x extends NoteWidgetProvider {
// 当小部件更新时调用
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
super.update(context, appWidgetManager, appWidgetIds);
}
// 获取小部件布局ID
protected int getLayoutId() {
return R.layout.widget_4x;
}
// 获取小部件背景资源ID
@Override
protected int getBgResourceId(int bgId) {
return ResourceParser.WidgetBgResources.getWidget4xBgResource(bgId);
}
// 获取小部件类型
@Override
protected int getWidgetType() {
return Notes.TYPE_WIDGET_4X;
}
}
/*
* Java NoteWidgetProvider_2x NoteWidgetProvider
NoteWidgetProvider_2x便2x
onUpdate
getLayoutId ID
getBgResourceId ID
getWidgetType
* */
Loading…
Cancel
Save