Class ViewPrintJob.Builder

    • Field Detail

      • view

        protected View view
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • view

        @Deprecated
        public ViewPrintJob.Builder view​(View view)
        Deprecated.
        Prefer view(View, int) since it ensures the View is laid out and measured.
        Set the view to print in this PrintJob. You must manually layout and measure your View before building an instance.
      • view

        public ViewPrintJob.Builder view​(View view,
                                         int viewWidth)
        This method differs from view(View) as it prepares the View for printing by laying it out and measuring it for you.
      • build

        public ViewPrintJob build()
        Builds an instance. Performs some blocking IO so it must be invoked on a background thread.
        Specified by:
        build in class PrintJob.Builder
      • layoutAndMeasureView

        public void layoutAndMeasureView​(View view,
                                         int viewWidth)
        Measure and layout the view that was passed