diff options
author | Elliott Hughes <enh@google.com> | 2009-07-25 15:38:13 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2009-07-25 15:55:19 -0700 |
commit | 65de0e6a266bb4d176194d21ee59661066134012 (patch) | |
tree | ba8b67cf5e395dd6d82e80e34f2e211ee405bc2a /docs/html/guide/appendix | |
parent | a04aaff2be2396b486181189c67d154e98892f9c (diff) | |
download | frameworks_base-65de0e6a266bb4d176194d21ee59661066134012.zip frameworks_base-65de0e6a266bb4d176194d21ee59661066134012.tar.gz frameworks_base-65de0e6a266bb4d176194d21ee59661066134012.tar.bz2 |
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.)
Diffstat (limited to 'docs/html/guide/appendix')
-rw-r--r-- | docs/html/guide/appendix/faq/commontasks.jd | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/html/guide/appendix/faq/commontasks.jd b/docs/html/guide/appendix/faq/commontasks.jd index 259b5d1..e88a867 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</a> to understand the basics of how an Android application works.</p> <p>You should also take a look at the ApiDemos application and the other sample -applications included in the SDK, in the <code><sdk>/samples/ +applications included in the SDK, in the <code><sdk>/samples/</code> folder in the SDK.</p> <p>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){ <pre>//Hide the title bar requestWindowFeature(Window.FEATURE_NO_TITLE); </pre> +<p>A better way to achieve the same end is to specify a theme in your Android +Manifest file:</p> +<pre><application android:icon="@drawable/icon" android:theme="@android:style/Theme.NoTitleBar"> +</pre> +<p>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 <code>onCreate</code> runs.</p> +<p>(Note that this can be applied to either the <code><application></code> +tag or to individual <code><activity></code> tags.)</p> <a name="localhostalias" id="localhostalias"></a><h2>Referring to localhost from the emulated environment</h2> <p> If you need to refer to your host computer's <em>localhost</em>, such as when you |