I am programmatically creating view in Android. Parent layout is RelativLlayout
and I'm adding two views in it. First is ListView
and second is custom view. I want my second custom view to come on top of the list, but somehow it is getting hidden behind the ListView
. How do I make sure that my custom view is on top.
Views get placed in the order you add them to their parent views. The view added last will be on top. You might also want to try
View.bringToFront()
http://developer.android.com/reference/android/view/View.html#bringToFront()