Question

I build a SideBar menu that contains some icons, when clicking on one of them, I need to popover a view next to the bar with a View inside of it.

My question is how add this view in top of any view that is not in the bar.

Just for clarify, this is my layout to get the SideBar on screen.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical" android:layout_width="match_parent"
 android:layout_height="match_parent">
 <ImageView android:id="@+id/image01" android:layout_width="wrap_content"
  android:layout_height="wrap_content" android:scaleType="fitXY" />
 <com.view.SideBarView android:id="@+id/sideBar"
  android:layout_width="40px" android:layout_height="match_parent"
  layout_toLeftOf="@id/image01" />
</RelativeLayout>

I need when click a icon on the bar to pop over the image on the left, and also have a View inside the balloon and get some user input.

If it's not too much, I need to draw a arrow next to the icon to this floating view.

There's an way to do that?

Was it helpful?

Solution

After searching I discovery how do that, I can do it with AbsoluteLayout (but I don't like it), so I discover my second option, use a PopupWindow to show my Content as a floating view.

This works perfectly.

OTHER TIPS

@Marcos If all you're looking is Floating Views you may use RelativeLayout , FrameLayout or AbsoluteLayout as described in this post "Creating Floating Views in Android".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top