Ted pottel
Ted pottel

Reputation: 6983

Trying to hide the title bar on my Android app

I'm trying to hide the title bar on my app by putting the following code in the manifest file

android:label="Sound Board" android:theme="@android:style/Theme.NoTitleBar"

It looks to be working on my tablet, but not on my smart phone. My tablet is version 3.1 and the smart phone is 2.2

-Ted

Upvotes: 0

Views: 306

Answers (1)

gunar
gunar

Reputation: 14710

I am not sure if that theme was available in api level 8 (2.2), but having following code in your Activity will provide the same result:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.activity_layout);
    ...
}

Upvotes: 2

Related Questions