Sugar.activity.activity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
The following code creates a simple activity called ToolbarExample: |
The following code creates a simple activity called ToolbarExample: |
||
{{{ |
|||
from sugar.activity import activity |
|||
class ToolbarExample(activity.Activity): |
class ToolbarExample(activity.Activity): |
||
Revision as of 14:49, 29 May 2008
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?
The following code creates a simple activity called ToolbarExample:
{{{ from sugar.activity import activity class ToolbarExample(activity.Activity):
def __init__(self, handle): activity.Activity.__init__(self, handle)
}}}