Development Team/Almanac/sugar.activity.activity
< Development Team | Almanac
Revision as of 10:00, 29 May 2008 by 155.212.201.242 (talk)
The sugar.activity.activity package includes several important classes that are needed to run a basic activity.
Class: Activity
How do I create a new activity that is derived from the base Activity class?
All activities must implement a class derived from the 'Activity' class. The convention is to call it ActivitynameActivity, but this is not required as the activity.info file associated with your activity will tell the sugar-shell which class to start.
from sugar.activity import activity ... class ToolbarExample(activity.Activity): def __init__(self, handle): activity.Activity.__init__(self, handle)