0

As the title, I'd like to associate multiple List Popup Window to a anchor (a view). For example: one above, one below, one left and one right of the anchor. But I have no idea if it's possible? Can you explain my problem? 1) How to add multiple ListPopupWindows to a anchor? 2) If above condition is possible, how would I be able to position each ListPopupWindow to the anchor?

Your comments would be appreciated!

Long Uni
  • 101
  • 3
  • 12

1 Answers1

0

Everything is possible in Android! :) I have no time to write for you, but here is the hint.

Create a layout xml file for a grid (TableLayout seems to be the best, but RelativeLayout or nested LinearLayout-s will also do):

    @id/topLeft       @id/toP      @id/topRight
    @id/left           Anchor      @id/right
    @id/bottomLeft    @id/bottom   @id/bottomRight

All placeholder views are declared as FrameLayout. When you need to add what you call "popup window" (name it popupView) use something like this:

     ((ViewGroup)findViewById(R.id.right)).addView(popupView); 
cyanide
  • 3,885
  • 3
  • 25
  • 33