当前位置: 首页>>代码示例>>Java>>正文


Java PrintAttributes.equals方法代码示例

本文整理汇总了Java中android.print.PrintAttributes.equals方法的典型用法代码示例。如果您正苦于以下问题:Java PrintAttributes.equals方法的具体用法?Java PrintAttributes.equals怎么用?Java PrintAttributes.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.print.PrintAttributes的用法示例。


在下文中一共展示了PrintAttributes.equals方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onLayout

import android.print.PrintAttributes; //导入方法依赖的package包/类
public final void onLayout(PrintAttributes paramPrintAttributes1, PrintAttributes paramPrintAttributes2, CancellationSignal paramCancellationSignal, PrintDocumentAdapter.LayoutResultCallback paramLayoutResultCallback, Bundle paramBundle)
{
  int i = 1;
  this.f = paramPrintAttributes2;
  if (paramCancellationSignal.isCanceled())
  {
    paramLayoutResultCallback.onLayoutCancelled();
    return;
  }
  if (this.b != null)
  {
    PrintDocumentInfo localPrintDocumentInfo = new PrintDocumentInfo.Builder(this.c).setContentType(i).setPageCount(i).build();
    if (!paramPrintAttributes2.equals(paramPrintAttributes1)) {}
    for (;;)
    {
      paramLayoutResultCallback.onLayoutFinished(localPrintDocumentInfo, i);
      return;
      int j = 0;
    }
  }
  this.a = new jo(this, paramCancellationSignal, paramPrintAttributes2, paramPrintAttributes1, paramLayoutResultCallback).execute(new Uri[0]);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:23,代码来源:jn.java

示例2: onLayout

import android.print.PrintAttributes; //导入方法依赖的package包/类
public void onLayout(final PrintAttributes oldPrintAttributes, final PrintAttributes newPrintAttributes, final CancellationSignal cancellationSignal, android.print.PrintDocumentAdapter.LayoutResultCallback layoutresultcallback, Bundle bundle)
{
    boolean flag = true;
    mAttributes = newPrintAttributes;
    if (cancellationSignal.isCanceled())
    {
        layoutresultcallback.onLayoutCancelled();
        return;
    }
    if (mBitmap != null)
    {
        cancellationSignal = (new android.print.PrintDocumentInfo.Builder(jobName)).setContentType(1).setPageCount(1).build();
        if (newPrintAttributes.equals(oldPrintAttributes))
        {
            flag = false;
        }
        layoutresultcallback.onLayoutFinished(cancellationSignal, flag);
        return;
    } else
    {
        mLoadBitmap = (layoutresultcallback. new PrintHelperKitkat._cls2._cls1()).execute(new Uri[0]);
        return;
    }
}
 
开发者ID:Hamz-a,项目名称:MyCTFWriteUps,代码行数:25,代码来源:PrintHelperKitkat$2$1.java

示例3: onLayout

import android.print.PrintAttributes; //导入方法依赖的package包/类
public final void onLayout(PrintAttributes paramPrintAttributes1, PrintAttributes paramPrintAttributes2, CancellationSignal paramCancellationSignal, PrintDocumentAdapter.LayoutResultCallback paramLayoutResultCallback, Bundle paramBundle)
{
  int i = 1;
  this.a = paramPrintAttributes2;
  PrintDocumentInfo localPrintDocumentInfo = new PrintDocumentInfo.Builder(this.b).setContentType(i).setPageCount(i).build();
  if (!paramPrintAttributes2.equals(paramPrintAttributes1)) {}
  for (;;)
  {
    paramLayoutResultCallback.onLayoutFinished(localPrintDocumentInfo, i);
    return;
    int j = 0;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:14,代码来源:jm.java

示例4: onLayout

import android.print.PrintAttributes; //导入方法依赖的package包/类
@Override
public void onLayout(
        PrintAttributes oldAttributes,
        PrintAttributes newAttributes,
        CancellationSignal cancellationSignal,
        PrintDocumentAdapterWrapper.LayoutResultCallbackWrapper callback,
        Bundle metadata) {
    // NOTE: Chrome printing just supports one DPI, whereas Android has both vertical and
    // horizontal.  These two values are most of the time same, so we just pass one of them.
    mDpi = newAttributes.getResolution().getHorizontalDpi();
    mMediaSize = newAttributes.getMediaSize();

    mNeedNewPdf = !newAttributes.equals(oldAttributes);

    mOnLayoutCallback = callback;
    // We don't want to stack Chromium with multiple PDF generation operations before
    // completion of an ongoing one.
    // TODO(cimamoglu): Whenever onLayout is called, generate a new PDF with the new
    //                  parameters. Hence, we can get the true number of pages.
    if (mPrintingState == PRINTING_STATE_STARTED_FROM_ONLAYOUT) {
        // We don't start a new Chromium PDF generation operation if there's an existing
        // onLayout going on. Use the last known valid page count.
        pageCountEstimationDone(mLastKnownMaxPages);
    } else if (mPrintingState == PRINTING_STATE_STARTED_FROM_ONWRITE) {
        callback.onLayoutFailed(mErrorMessage);
        resetCallbacks();
    } else if (mPrintable.print()) {
        mPrintingState = PRINTING_STATE_STARTED_FROM_ONLAYOUT;
    } else {
        callback.onLayoutFailed(mErrorMessage);
        resetCallbacks();
    }
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:34,代码来源:PrintingControllerImpl.java


注:本文中的android.print.PrintAttributes.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。