ImageButton over action bar android -
i want imagebutton on action bar in app this:
my xml code is:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.v7.widget.recyclerview android:layout_width="match_parent" android:layout_height="match_parent" tools:context="in.yumigo.yumigovendor.ui.activity.invoiceactivity" android:id="@+id/invoice_recycler_view"> </android.support.v7.widget.recyclerview> <imagebutton android:elevation="2200dp" android:id="@+id/float_calendar" android:background="@android:color/transparent" style="@style/calendarfloating" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/calendar_144" android:layout_alignparentright="true" /> </relativelayout>
obviously, button hidden under actionbar this:
how achieve it?
if can place right below actionbar
, try giving imagebutton negative margintop
.
e.g. android:margintop="-16dp"
you may need use elevation
and/or bringtofront
bring imagebutton in front of actionbar
Comments
Post a Comment