Метод onCreate (Bundle) не определен для типа AppWidgetProvider
public class SupermarioActivity<imageButton1> extends AppWidgetProvider {
public static SupermarioActivity Widget = null;
public static Context context;
public static AppWidgetManager appWidgetManager;
public static int appWidgetIds[];
@Override
public void onUpdate( Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds ) {
if (null == context) context = SupermarioActivity.context;
if (null == appWidgetManager) appWidgetManager = SupermarioActivity.appWidgetManager;
if (null == appWidgetIds) appWidgetIds = SupermarioActivity.appWidgetIds;
SupermarioActivity.Widget = this;
SupermarioActivity.context = context;
SupermarioActivity.appWidgetManager = appWidgetManager;
SupermarioActivity.appWidgetIds = appWidgetIds;
Log.i("PXR", "onUpdate");
}
static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,
int appWidgetId) {
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
remoteViews.setImageViewResource(R.id.imageButton1, appWidgetId);
// Tell the widget manager
appWidgetManager.updateAppWidget(appWidgetId, remoteViews);
}
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
imageButton1 imagebutton1 = (imageButton1) findViewById(R.id.imageButton1);
imageButton1.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
ImageView iv = (ImageView) findViewById(R.id.imageview1);
iv.setVisibility(View.VISIBLE);
}
});
}
private void setContentView(int main) {
// TODO Auto-generated method stub
}
private imageButton1 findViewById(int imagebutton1) {
// TODO Auto-generated method stub
return null;
}
}