If you want to open any file which you have retrieved from Drive, then this can be done easily while using the resources of Google Drive app. First of all install the Google Drive app from play market
Install Google Drive app from here
After that use this code to open your file.
FileID=file.getId();//it is your file ID which you want to display
String url = "https://docs.google.com/file/d/"+FileID;
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
It will display your file of any type(image, pdf, doc, txt etc)