ImageButton over action bar android -


i want imagebutton on action bar in app this:

enter image description here

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: enter image description here

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

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -