You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package net.micode.notes.widget ;
import android.appwidget.AppWidgetManager ;
import android.content.Context ;
import net.micode.notes.R ;
import net.micode.notes.data.Notes ;
import net.micode.notes.tool.ResourceParser ;
// 2x尺寸笔记小部件提供者类, 继承自NoteWidgetProvider, 实现特定于2x尺寸小部件的功能
public class NoteWidgetProvider_2x extends NoteWidgetProvider {
// 当小部件更新时调用,调用父类的更新方法来更新小部件
@Override
public void onUpdate ( Context context , AppWidgetManager appWidgetManager , int [ ] appWidgetIds ) {
super . update ( context , appWidgetManager , appWidgetIds ) ;
}
// 获取2x尺寸小部件的布局ID
@Override
protected int getLayoutId ( ) {
return R . layout . widget_2x ;
}
// 根据背景颜色ID获取2x尺寸小部件的背景资源ID
@Override
protected int getBgResourceId ( int bgId ) {
return ResourceParser . WidgetBgResources . getWidget2xBgResource ( bgId ) ;
}
// 获取2x尺寸小部件的类型
@Override
protected int getWidgetType ( ) {
return Notes . TYPE_WIDGET_2X ;
}
}