ph94
ph94

Reputation: 27

How to remove bar (Android Studio)

I am learning Android Studio and I made my first app. When I run it, there is a bar (is it a right name for it?) that I don't want (this with three dots on the right). How to remove it? I was trying with changing AndroidManifest.xml android:theme but app started crashing.

https://i.sstatic.net/uKJsI.png

Upvotes: 0

Views: 5622

Answers (4)

Qandeel Abbassi
Qandeel Abbassi

Reputation: 999

Sorry but i am confused that whether you want to remove the whole bar (ActionBar) or you want to remove the "three dots (menu)" on the right of the bar... If you want to remove the whole bar then try this: Put this under your activity tag in android manifest

     `android:theme="@android:style/Theme.NoTitleBar"`

and if you want to remove those three dots then "Saeid Yazdani" is right.

Upvotes: 1

android_eng
android_eng

Reputation: 1370

In the Android Manifest change the theme to the following

android:theme="@android:style/Theme.NoTitleBar"

Upvotes: 1

Simar
Simar

Reputation: 590

In styles.xml, select a theme with no action bar. For example

Theme.AppCompat.Light.NoActionBar 

Also

1) exend your class from Activity instead of ActionBarActivity

2) remove method onCreateOptionsMenu (if present) from your activty

3) remove method onOptionsItemSelected (if present) from your activity

Upvotes: 3

blieberman
blieberman

Reputation: 3

Your activity likely extends ActionBarActivity and the OnCreateOptionsMenu method is created by default.

To note, you should put the Activity back into the Manifest and edit the Actvity Java class file.

Upvotes: 0

Related Questions