2011-03-15 37 views
2

我正在嘗試顯示標註。我在主佈局中有一個按鈕。點擊這個Button我需要顯示一個窗口彈出箭頭poiting點擊按鈕。我嘗試使用PopupWindow,但是這顯示了一個正常的彈出窗口,我需要將它顯示爲一個標註,從按鈕出來。有什麼建議麼?Android:帶標註的彈出窗口

這是我的COE到目前爲止

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

回答

0

這裏是一個PopupWindow風格很喜歡小部件可能會幫助你。

PointerPopupWindow