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.
Related
I am creating an app in android which loads text(HTML) and images, this app is a book. I have a listview with a search box on top. On selecting an item, (which is simply a page) the app loads it for the user to read. I am stuck in that I have to created an activity for each page. I wanted to reuse one activity which I named DisplayActity , this activity contains a webview to display my content. I am somehow still an android newbie
Must I do this in as many pages as I have and also create as many activities as the number of my book pages?
No. When the user elects to switch pages, just update the content in your existing DisplayActivity. For example, if DisplayActivity shows the content via a WebView, update the WebView for the newly-selected page.
I want to make a app for pdf reader, Now ,I can read every page of pdf ,but I dont' know how to make the pages organized, I want to organize the pages when I click the right ,it presents the next page , in a contrast, click the left ,it presents the last page, in a addition, the page should display in full screen.
Through collecting some infomation, I know maybe the adapterView and adapter can be used to , but I still don't know how to do it.
Can you give me a idea? Thank you very much.
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.
I developed a dictionary where i'm launching "MainActivity" when the app launchs. So user will put a hint in the Searchview and the list of words will load in this activity. When we click on a word, a "DefinitionActivity" will launch where we can the the definition and details of the clicked word. So how can i convert this same app to an app where the main list and the details page will load in the same layout so the list of words (MainActivity) will appear on left and the "DefinitionActivity" will load on the right of the page. I need the best way to make this conversion using my existing code and layouts. So the same app loaded on a mobile phone will appear as i developed before and opened on a tablet: list of words and the details page in the same page.
You will need to use the Fragments API introduced in API Level 11.
To get started with check out this example on Android Blog. (http://android-developers.blogspot.in/2011/02/android-30-fragments-api.html)
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.