From 65de0e6a266bb4d176194d21ee59661066134012 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Sat, 25 Jul 2009 15:38:13 -0700 Subject: [PATCH] Encourage the better way of removing an Activity's title bar. Books and web pages seem to prefer the requestWindowFeature method over the android:theme, despite the advantages of the latter. This may be because we mention requestWindowFeature but not android:theme in our FAQ. (Also add missing end tag to fix page rendering with Chrome.) --- docs/html/guide/appendix/faq/commontasks.jd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/html/guide/appendix/faq/commontasks.jd b/docs/html/guide/appendix/faq/commontasks.jd index 259b5d1fa22d2..e88a8672e98a8 100644 --- a/docs/html/guide/appendix/faq/commontasks.jd +++ b/docs/html/guide/appendix/faq/commontasks.jd @@ -56,7 +56,7 @@ href="{@docRoot}guide/topics/fundamentals.html">Application Fundamentals to understand the basics of how an Android application works.

You should also take a look at the ApiDemos application and the other sample -applications included in the SDK, in the <sdk>/samples/ +applications included in the SDK, in the <sdk>/samples/ folder in the SDK.

Finally, a great way to started with Android development in Eclipse is to @@ -281,6 +281,15 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data){

//Hide the title bar
 requestWindowFeature(Window.FEATURE_NO_TITLE);
 
+

A better way to achieve the same end is to specify a theme in your Android +Manifest file:

+
<application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar">
+
+

This is preferable because it tells the system not to show a title bar while +your application is starting up. With the explicit method call, your application +will have a title bar visible to the user until onCreate runs.

+

(Note that this can be applied to either the <application> +tag or to individual <activity> tags.)

Referring to localhost from the emulated environment

If you need to refer to your host computer's localhost, such as when you