2011-03-15 8 views
2

J'essaie d'afficher une légende. J'ai un bouton dans ma disposition principale. Onclick de ce Button J'ai besoin de montrer une fenêtre popup avec une flèche se trouvant sur le bouton cliqué. J'ai essayé d'utiliser PopupWindow, mais cela montre un popup normal, j'ai besoin de le montrer comme une légende, en sortant du bouton. Aucune suggestion?Android: fenêtre PopUp avec légende

Ceci est mon coe jusqu'à présent

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

Répondre