code: @Override
      public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
          int height = 0;
  
          for (int i = 0; i < getChildCount(); i++) {
              View child = getChildAt(i);
              child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
              int h = child.getMeasuredHeight();
              if (h > height)
                  height = h;
          }
  
          heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
  
          super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  
          mDatePicker = (DatePicker) findViewById(R.id.hlklib_datetimepicker_date_picker);
          mTimePicker = (TimePicker) findViewById(R.id.hlklib_datetimepicker_time_picker);
      }
docs: Setting wrap_content on a ViewPager's layout_height in XML
  doesn't seem to be recognized and the ViewPager will fill the
  height of the screen regardless. We'll force the ViewPager to
  have the same height as its immediate child.
  <p>
  Thanks to alexrainman for the bugfix!