0

I have an action bar with tabs, lay out looks like

https://i.stack.imgur.com/cySGd.png

As you can see there are 2 sections in action bar (one where icon and app name is printed, and another where tabs are placed)

How can I remove portion of action bar where title and icon of application is displayed completely so that only tabs are shown on the top of screen

3 Answers3

0

Sound like you want to show your Activity in Full Screen. you can achieve that with that code

public class ActivityName extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // remove title
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.main);
}} 

You can refer these Link it may help you.

Community
  • 1
  • 1
ULHAS PATIL
  • 862
  • 8
  • 19
0

Sound like you want to disable your action bar. Use this in Application tag of your manifest file.

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

If your problem doesn't resolve so feel free to ask me.

You can use this Link, It will help you.

Community
  • 1
  • 1
scienticious
  • 438
  • 1
  • 7
  • 22
0

For disable the action bar completely for your application use this in your manifest file under application tag or for particular use under activity tag.

< android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >

Sundeep Badhotiya
  • 810
  • 2
  • 9
  • 14