I'm displaying a pdf in webview using help of google docs, with this url, https://docs.google.com/gview?url=+location of pdf. It's breaking the pages and giving navigation icons on top right. Is there any way to display all the pages in single flow instead of breaking them.
In the image above, instead of showing in 10 different pages, i want the pdf to be displayed in single flow, I don't want to use navigation buttons on top right.
when &overridemobile=true is appended to URL, this image is being showed.
You can append &overridemobile=true to the url.
Example:
https://docs.google.com/gview?url=www.example.com/example.pdf&overridemobile=true
This will override the mobile viewer and take you to the desktop version, which has a single flow.
Related
I want to build a simple book app for android that contains 100 pages of text-only content using android studio.
First activity to enter , 2 buttons for navigating to next and previous page and page number indicator. Also when page indicator clicked, a window pops up for entering specific page number.
Which way is better for this purpose ? Database or HTML method ?
Is there any source code or tutorial resources ?
I have done this using HTML method. What I did is I created HTML files for all the pages, then zipped all the pages.
After that unzipped it into android file system then using WebView I am able to view all the pages like a book app does.
I have added next page, previous page, and search button also.
i need to convert a complete website into an android app. But I don't want the header, menu and footer in every page to be displayed.
Is there any way I can just take the content of the webpage alone and display in web view.?
Thanks.
If you are using joomla...i have a solution that worked for me....
Go to template settings, hide the logo, menu and footer section
In your app you wll not see any header, footer and logo
Do you have control over the website's source? If yes, it is much easier to write a css-file for mobiles (and use JS to detect the UserAgent) than to do any of that work in the mobile app itself.
However, if you really want to mess with the page on your device, you can extract the html-source, change it (delete the header+menu+footer), and load that changed source into the webview.
I am nearly done with my first app, but I am still working on some little issues.
My main problem is that I am loading a normal html page, but I have no access to the html code.
Now I want to center the page in the webview module, because the page is also centered, so that when I am loading the page, I have to scroll all the time to the right side and that is really anoying.
So how do I do that, that the webview modul automatically loads the page already centered and the user of the app sees the middle of the page?
You mean, you dont want horizontal scroll,for that try this :
mwebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
I've been researching and was surprised to find out that there was no text wrapping feature. However, I did see many suggest that webview might be an option to display such a thing. I've used webview to load a url, but how would I use it to display a body of text and image that is retrieved from a web service from within the app.
I make a call to the web service, I get the information, then I want to display it. Keep in mind only the top of my activity will have the text and image, so below the webView i'd want to implement some accordian style list view and a view page image gallery.
This is HTML land.
<img align="left" src="[whatever]"/> Put your text here. It should wrap
around your image when it gets to the end. I know somebody will freak and
post the appropriate CSS for this, but whatever. This should work.
Load that into your web view. For referencing the image, you have two basic options. Put the remote URL in the source (this may be very difficult), or save it locally and use "file:///[path to file]".
I'm currently doing a application (project) on android. I would like to know how to create my own buttons in webview, or creating a tab bar in webview. Also, I would want to retrieve certain contents from a website (or rather, from livejournal, to be specifc), like, I do not want the buttons that are in livejournal itself, I just want certain contents, maybe like some live journal posts. Is there any way I could do this?
Thank you so much in advance!
Instead of putting tabs in the WebView you should put the WebView in Tabs. As for pulling information from LiveJournal there are two possibilites. They either have a public api that you can access to get the data you want and use that to populate your app or they don't. If they don't your only recourse would be to pull in the raw html and try to parse it. At that point you might was well just use the webpage as is.