Android version of iOS Quick Look Framework

2019-04-28 23:09发布

问题:

Is there something similar to the iOS Quick Look Framework for Android? I'm trying to display/preview PDF and Microsoft Office files inside my Activity. I know that I can use Intents to open the files using the associated viewer but I would like to know if it's possible to not leave my application.

回答1:

It's only possible if you write your own viewers. The iOS app is calling out to an external class which just happens to render inside your own view. Not much different to Android except, you use an intent rather than call a specific app or framework which is more flexible since the user chooses how the file is opened.