开发者

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 cli开发者_Python百科cked. 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);


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

Android Quick Actions UI Pattern


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

PointerPopupWindow

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜