AnaF
AnaF

Reputation: 63

How to remove an extra line under toolbar? (android)

enter image description here in my xml i have only listview and toolbar, i dont uderstand why after emulating i see an extra blue line under the toolbar

  android.support.v7.widget.Toolbar
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    app:popupTheme="@style/AppTheme.PopupOverlay"
    />


    <ListView
    android:layout_width="match_parent"
    android:layout_height="220dp"
    android:id="@+id/list"
    android:layout_alignParentStart="true"
    android:layout_alignParentBottom="true"
    android:layout_below="@+id/toolbar" />

Thank you

Upvotes: 0

Views: 435

Answers (2)

Matias Elorriaga
Matias Elorriaga

Reputation: 9150

Your app's theme should extends some "NoActionBar" theme, for example:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- your app configuration here -->
</style>

Upvotes: 0

Dinesh
Dinesh

Reputation: 219

Change your styles.xml and AndroidManifest.xml to remove action bar and title

styles.xml:

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

and then set it as your activity's theme in AndroidManifest.xml:

<activity android:theme="@style/NoActionBar" ... />

Refer How to disable action bar permanently

Upvotes: 1

Related Questions