下面列出了怎么用android.app.Presentation的API类实例代码及写法,或者点击链接到github查看源代码。
@Override
public Presentation initPresentation() {
DisplayManager displayManager = (DisplayManager) mContext.getSystemService(Context.DISPLAY_SERVICE);
Display[] presentationDisplays = displayManager
.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);
if (presentationDisplays.length > 0) {
Display presentationDisplay = presentationDisplays[0];
mPresentation = new PdfPresentation(mContext, presentationDisplay);
mPresentation.getWindow().setType(
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
SystemPropertyUtils.setSystemProperty(mContext, "sys.eink.Appmode", "13");
mPresentation.show();
return mPresentation;
}
return null;
}
Presentation initPresentation();