Tushar Vengurlekar
Tushar Vengurlekar

Reputation: 7679

Android: PopUp window with callout

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);

Upvotes: 2

Views: 6632

Answers (2)

M R
M R

Reputation: 1

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

PointerPopupWindow

Upvotes: 0

sat
sat

Reputation: 41076

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

Android Quick Actions UI Pattern

Upvotes: 4

Related Questions