title: How to fix picker dialog that is cutoff in smaller screens?
body: <p>In android application, I have used <code>TimePickerDialog</code> and <code>DatePickerDialog</code>. I want to develop this app in all different screen sizes.</p>
  
  <p>The problem is, this dialog size is the same on all screen sizes. Dialog does not adjust its size as the size of the screen changes. So, on a smaller screen, the content of the dialog is cut off. </p>
  
  <p>How can I adjust this dialog?</p>
  
  <p>below is output I am getting in different size device. I even can't able to scroll in this dialog</p>
  
  <p><a href="https://i.stack.imgur.com/UVRMi.jpg" rel="nofollow noreferrer">App output1</a></p>
  
  <p><a href="https://i.stack.imgur.com/epiah.jpg" rel="nofollow noreferrer">App output2</a></p>
  
  <p>Code of DatePickerdialog:</p>
  
  <pre><code> DatePickerDialog datePicker;
  
   editText_date.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              datePicker = new DatePickerDialog(mActivity,new DatePickerDialog.OnDateSetListener() {
  
                  @Override
                  public void onDateSet(DatePicker view, int y, int m, int d) {               
                   //other code here
                  }
              },yy,mm,dd);
  
           //allow only future dates
              datePicker.getDatePicker().setMinDate(System.currentTimeMillis());
              datePicker.getDatePicker().setMaxDate(maxDate.getTimeInMillis());
              datePicker.show();
          }
      });
  </code></pre>