2

I am trying to display a callout. I have a button in my main layout. Onclick of this Button I need to show a window popup with an arrow poiting to the button clicked. I tried using PopupWindow, but this shows a normal popup, I need to show it like a callout, coming out from the button. Any suggestions?

This is my coe so far

            LayoutInflater inflater = getLayoutInflater();
            View mView= inflater.inflate(R.layout.lt_popupwindow,(ViewGroup)findViewById(R.id.ltPopUpParent));              
            View mView2= inflater.inflate(R.layout.main,(ViewGroup)findViewById(R.id.ltMainParent));
            PopupWindow mPopupWindow = new PopupWindow(mView,LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT,false);
            mPopupWindow.setAnimationStyle(android.R.style.Animation_Dialog);
            mPopupWindow.showAtLocation(mView2, Gravity.NO_GRAVITY, 0, 0);
Tushar Vengurlekar
  • 7,649
  • 8
  • 33
  • 48

2 Answers2

4

Have a look here If you have not before , This might help you.

Android Quick Actions UI Pattern

Community
  • 1
  • 1
sat
  • 40,138
  • 28
  • 93
  • 102
0

Here is a PopupWindow-style liked widget might help you.

PointerPopupWindow

M R
  • 1
  • 2