本文整理汇总了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]);
}
示例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;
}
}
示例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;
}
}
示例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();
}
}