title: PopupWindow being cutoff towards bottom of screen
body: <p>PopupWindow inflates fine until it is near bottom of screen it's being cut off. Anyone know how I can it inflate upwards when it's towards bottom of screen?</p>
  
  <p><a href="https://i.stack.imgur.com/gOps1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gOps1.png" alt="enter image description here"></a></p>
  
  <pre><code>public SelectBucketMenu(Context context) {
          super(context);
          this.mContext = context;
  
          setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
          setOutsideTouchable(true);
          setFocusable(true);
          //Need set windowlayout for API 19 otherwise window won't appear
          setWindowLayoutMode(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
  
          setupView();
      }
  
      private void setupView(){
          View view = LayoutInflater.from(mContext)
                  .inflate(R.layout.popupmenu_selectbucket, null);
          ButterKnife.bind(this, view);
          setContentView(view);
      }
  </code></pre>
  
  <p>Anyone know why?</p>