Designing the User Interface(Chapter 3 of Hello, Android)
2010-01-09 22:34
381 查看
A layout is a container for one or more child objects and a behavior to position them on the screen within the rectangle of the parent object.
Here is a list of the most common layouts provided by Android:
FrameLayout: classArranges its children so they all start at the top left of the screen. This is used for tabbed views and image switchers.
LinearLayout: Arranges its children in a single column or row. This is the most common layout you will use.
RelativeLayout: Arranges its children in relation to each other or to the parent. This is often used in forms.
TableLayout: Arranges its children in rows and columns, similar to an HTML table.
The Log class provides several static methods to print messages of various severity levels to the Android system log:
• Log.e( ): Errors
• Log.w( ): Warnings
• Log.i( ): Information
• Log.d( ): Debugging
• Log.v( ): Verbose
Users will never see this log, but as a developer you can view it in a couple ways. In Eclipse, open the LogCat view by selecting Window > Show View > Other... > Android > LogCat.
Here is a list of the most common layouts provided by Android:
FrameLayout: classArranges its children so they all start at the top left of the screen. This is used for tabbed views and image switchers.
LinearLayout: Arranges its children in a single column or row. This is the most common layout you will use.
RelativeLayout: Arranges its children in relation to each other or to the parent. This is often used in forms.
TableLayout: Arranges its children in rows and columns, similar to an HTML table.
The Log class provides several static methods to print messages of various severity levels to the Android system log:
• Log.e( ): Errors
• Log.w( ): Warnings
• Log.i( ): Information
• Log.d( ): Debugging
• Log.v( ): Verbose
Users will never see this log, but as a developer you can view it in a couple ways. In Eclipse, open the LogCat view by selecting Window > Show View > Other... > Android > LogCat.
相关文章推荐
- Android Programming: Pushing the Limits -- Chapter 5: Android User Interface Operations
- The Connected World(Chapter 7 of Hello, Android)
- Android Programming: Pushing the Limits -- Chapter 4: Android User Experience and Interface Design
- Exploring 2D Graphics(Chapter 4 of Hello, Android)
- Multimedia(Chapter 5 of Hello, Android)
- Locating and Sensing(Chapter 8 of Hello, Android)
- Windows Mobile 7 梦幻之旅系列2之―Goals of the New User Interface
- How to customise the TWebBrowser user interface (part 1 of 6)
- Android NDK – hello catcake ~ Move the scene into the center of the screen
- How to customise the TWebBrowser user interface (part 2 of 6)
- Key Concepts(Chapter 2 of Hello, Android)
- droiddraw - DroidDraw is a graphical user interface (GUI) builder for the Android platform - Google Project Hosting
- Pushing the Limits of User-Defined Runtime Attributes in Interface Builder
- How to customise the TWebBrowser user interface (part 3 of 6)
- The Obligatory Hello World Example(Chapter 2 of XSLT 2nd Edition)
- How to customise the TWebBrowser user interface (part 4 of 6)
- Putting SQL to Work(Chapter 9 of Hello, Android)
- How to customise the TWebBrowser user interface (part 5 of 6)
- translation:Achieving of Chinese Display in the embedded graphical user interface of uC/GUI in Two
- Storing Local Data(Chapter 6 of Hello, Android)