¿Cómo crear un fragmento sin barra de acción en Android?

Hi all I have to create fragment with out action bar. Like this

enter image description here

In this picture I created Lienarlayout and placed that image in center. Below of that I want to create 4 fragments like projects,calender,filter and search. I searched a lot and tried by many codes but all the fragments has created with action bar. But i need to create fragments without action bar. How can I create that? Can anybody tell me? Thanks in advance.

preguntado el 27 de noviembre de 13 a las 05:11

1 Respuestas

ActionBars are actually components of your Activity objects and not your Fragments. (Take a look at the ActionBar documentation here). If your app is API level >= 11, your Activity objects will have ActionBars by default. These are set by the SDK-provided Holo theme. You can remove the ActionBar from the Activity to which your fragments are attached.

In order to do so, modify the Holo theme. Create a styles resource like so:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">

    <style name="NoActionBar" parent="">
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>

Then in your manifest you should associate the modified theme with the Activity that you want to be ActionBar-less:

        android:theme="@style/NoActionBar" >

respondido 27 nov., 13:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.