2010년 3월 26일 금요일

Hiding a Title bar on Activity,

1. Hiding a Title bar on Activity,

You can set a number of general window properties, such as whether to display a title, whether the window is floating, and whether it displays an icon, by calling methods on the Window member of the underlying View object for the window. Examples include calling getWindow().requestFeature() (or the convenience method requestWindowFeature(some_feature)) to hide the title. Here is an example of hiding the title bar:

//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.)


From. Android Developers

댓글 없음:

댓글 쓰기

Twitter 사용법 모음

조금전 Twitter에 관련해서 검색하다, 우연치 않게 평소에 잘 가지 않던 Navxxxxx.com에서 개념 답변 하나 발견하여 까먹을 까봐 여기다 옮겨 적는다. 출처 : http://mooo.org/10392 트위터가 뭐냐고? - kin...