2017-04-12 4 views
-1

J'utilise ListPopupWindow et je veux ajouter l'ombre inférieure à elle. Ci-dessous est mon code -Ombre inférieure à ListPopupWindow android

listPopupWindow = new ListPopupWindow(getApplicationContext()); 
    listPopupWindow.setContentWidth(500); 
    listPopupWindow.setDropDownGravity(Gravity.CENTER | Gravity.RIGHT); 
    listPopupWindow.setSelection(mSelectedPos); 
    listPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() { 
     @Override 
     public void onDismiss() { 
      listPopupWindow.dismiss(); 
     } 
    }); 
    Listpopupadapter adapter = new Listpopupadapter(mContext, mGameSortList, GameName, mFilterStr,mListener,Gravity.RIGHT); 
    listPopupWindow.setAdapter(adapter); 
    listPopupWindow.setAnchorView(mRightTV); 
    listPopupWindow.setForceIgnoreOutsideTouch(true); 
    listPopupWindow.show(); 

comment afficher l'ombre du bas lorsque popup est affiché.

TIA

+0

Se référer aussi celui-ci http://stackoverflow.com/questions/21211870/android-view-shadow petite description –

Répondre

1
listPopupWindow.setBackgroundDrawable(new ColorDrawable(Color.BLACK)); 
+1

solution od peut aider à comprendre concept derrière problème. –