|
Activity An activity is quite similar to a "screen". I suppose the name has been chose out of the fact that the application screen which is in front is the one that consumes most of the actual CPU power. Your project contains one or more activities. These are XML files located in the /res/layout folder. The Eclipse ADK not only offers a textual view but also a graphical layout editor. An empty activity file looks like this: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingBottom="@dimen/none" android:paddingLeft="@dimen/none" android:paddingRight="@dimen/none" android:paddingTop="@dimen/none" tools:context=".Main" > </FrameLayout> For the given example, the outer element is "FrameLayout". There exists different kind of layout managers. I'll try to describe some on another pager. Notice also the "layout_width" and "layout_height" parameters, which describe how the activity will fill up the space in its parent container. The "@dimen/none" values for the padding are described at the page about how to make an application run in fullscreen. |