0

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

1
  • android:theme="@android:style/Theme.NoTitleBar.Fullscreen">. It has worked for me across all smart phones from 2.2 to 4.2 Commented Jul 25, 2013 at 17:41

1 Answer 1

2

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);
    ...
}
Sign up to request clarification or add additional context in comments.

1 Comment

You should actually probably do both. I find that if you dont declare it in XML, you will see it flash up in the start of the activity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.