I made my custom Action Bar, but there is an ugly underline in under it.
You can see the black line under my green actionBar.
my Action Bar xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="0dp"
android:layout_marginTop="4dp" >
<ImageButton
android:id="@+id/menuToggleBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:adjustViewBounds="false"
android:background="@null"
android:scaleType="centerInside"
android:src="@drawable/menu_btn" />
<ImageView
android:id="@+id/loadingIconIv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:src="@drawable/flexilogo" />
<ImageButton
android:id="@+id/ImageButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="false"
android:background="@null"
android:scaleType="centerInside"
android:src="@drawable/menu_btn"
android:visibility="invisible" />
</LinearLayout>
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#6ea541" />
And my code::
ActionBar actionBar = getActionBar();
actionBar.setCustomView(R.layout.action_bar);
menuToggleBtn = (ImageButton) actionBar.getCustomView().findViewById(
R.id.menuToggleBtn);
menuToggleBtn.setOnClickListener(this);
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
Why is that black line is there ? I would like to get rid of it. Please help if you can.
E D I T:
I tried to add:
<item name="android:windowContentOverlay">@null</item>.
to my app's style, but it does not work :(