FolioReader-Android icon indicating copy to clipboard operation
FolioReader-Android copied to clipboard

Book Cover Image is not displying

Open ravigupta9363 opened this issue 7 years ago • 4 comments

Thanks for the awesome library, I just want to know why my Book Cover is not getting displayed in Android.

ravigupta9363 avatar Apr 12 '17 08:04 ravigupta9363

This solution is a little hacky

Folio base url file path is getting wrong. You will have to change the code to make it work.

Working Solution:

//FolioPageFragment -> initWebView method change the code
if(opfPath != null){
            String baseUrl
                    = "file://" + FileUtil.getFolioEpubFolderPath(mEpubFileName) + "/" + opfPath + "//";
            mWebview.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "UTF-8", null);
        }else{
            String baseUrl
                    = "file://" + FileUtil.getFolioEpubFolderPath(mEpubFileName)  + "//";
            mWebview.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "UTF-8", null);
        }

nikita2423 avatar Apr 13 '17 12:04 nikita2423

the above solution isn't working for me

vikasrairajput avatar Feb 04 '18 19:02 vikasrairajput

@nikita2423 @vikasrairajput @ravigupta9363

how can i get image in epub file. i am show in epub cover image in recyclerview book list

KishanViramgama avatar Aug 04 '19 10:08 KishanViramgama

This solution is a little hacky

Folio base url file path is getting wrong. You will have to change the code to make it work.

Working Solution:

//FolioPageFragment -> initWebView method change the code
if(opfPath != null){
            String baseUrl
                    = "file://" + FileUtil.getFolioEpubFolderPath(mEpubFileName) + "/" + opfPath + "//";
            mWebview.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "UTF-8", null);
        }else{
            String baseUrl
                    = "file://" + FileUtil.getFolioEpubFolderPath(mEpubFileName)  + "//";
            mWebview.loadDataWithBaseURL(baseUrl, htmlContent, "text/html", "UTF-8", null);
        }

Sorry! I am also facing this problem with folio reader, can you tell me where to put those code...

djsamwel avatar Jun 04 '20 05:06 djsamwel