Updating the Help Screen Layout

The help.xml layout file dictates the user interface of the help screen. At this point, you open the Eclipse layout resource editor and remove all existing controls from the layout. You then follow these steps to generate the layout you want, based on the screen design:

1. Add a new LinearLayout control and set its background attribute to @draw-able/bkgrnd. All subsequent controls will be added inside the LinearLayout control.

2. Add the same header you created in the menu.xml layout. It should contain a RelativeLayout control with two ImageView controls and a TextView control. Set the TextView control's text attribute to the string resource called @string/help to reflect the appropriate screen title.

3. Outside the RelativeLayout control but still within the LinearLayout control, add a TextView control called TextView_HelpText. Set its layout_width attribute to fill_parent and its layout_height attribute to fill_parent.

Did you Know?

Did you Know?

You can automatically link phone numbers, web addresses, email addresses, and postal addresses that show in the TextView control to the Android Phone Dialer, Web Browser, Email, and Map applications by setting the linksClickable attribute to true and the autoLink attribute to all for the TextView control.

At this point, save the help.xml layout file.

You can make TextView control text bold or italic by using the textStyle attribute.

0 0

Post a comment