문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

@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".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top