android - How to add a floating button on ListFragment? -


how add floating button on listfragment? (listadapter..) saw lots of examples using activity none substancial using listfragments.. possible?

you need override oncreateview in fragment class.

http://developer.android.com/reference/android/app/listfragment.html

listfragment has default layout consists of single list view. however, if desire, can customize fragment layout returning own view hierarchy oncreateview(layoutinflater, viewgroup, bundle). this, view hierarchy must contain listview object id "@android:id/list" (or list if it's in code)

create own layout frame or relative layout allow views overlap - , make floating button.

roughly this:

<framelayout>    <listview android:id="@id/android:list" />    <button /> </framelayout> 

Comments