Code example for PopupWindow

Methods: getWidthisShowingshowAsDropDown

0
    protected DirectoryItem viewToItem(View view) {
        return (DirectoryItem) view.getTag();
    } 
 
    public void toggle() { 
        if (mPopup.isShowing()) {
            hide(); 
        } else { 
            show(); 
        } 
    } 
 
    public void show() { 
        mPopup.showAsDropDown(mAnchor); 
 
        Log.d(TAG, "width: " + mPopup.getWidth());
    } 
 
    public void hide() { 
        mPopup.dismiss();
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE