In Progress

Webview in Android loads a text file

I don't care about graphic design. Make it as plain as possible as long as it fulfils the requirements specified below.

I need an android app with only two Activities. The 1st activity will contain 4 btns with the following texts: Text1,..., Text4. I will provide you with 4 text files: [url removed, login to view],...,Text4.txt. Once the btn with the text "Text(N)" is clicked, the app will show the 2nd activity passing as a parameter the file with name "Text(N).txt".

The 2nd activity must only contain a WebView that fills the whole screen both vertically and horizontally. At the bottom, a BACK btn to return to the 1st activity. The Webview will display the content of the file passed as a parameter as it is. Ex., if the txt file contains 800 lines of text, each of length 600 characters and a '\n' character at the end of the line, it should be displayed like that on the webview. NO WORD WRAP.

You must configure the Webview so that the text displayed can be zoomed in and out by pinching on the screen. As the user pinches IN on the screen, the text will become smaller and smaller until it is no longer readable. That is, the characters become so small that they appear as black dots on the screen.

If the user pinches OUT (SPREAD), the characters start becoming readable again.

The text files mostly contain the ASCII characters: -,*@#$%.=;, so don't expect to find letters on it.

The text cannot be word-wrapped. For example, when the characters are readable, the whole content will NOT be visible on the screen, so the user will have to move over the text(scroll vertically and horizontally by sliding a finger on the screen) if he wants to see more content.

Why a Webview? A webview is very responsive, so once the text is loaded, you can easily do all the gestures mentioned above to zoom in and out, as well as scrolling.

I've tried this before, and the problem I have encounter is that, since the text files are mostly made with the characters mentioned above, it cuts the text at random points. For example, if my text file contains only one line of text of length 600, it splits the line at length 27, then it splits again at line 68, and so on (SPLIT POINTS ARE RANDOM). By doing so, the Webview messes all the original text and ends displaying several lines of text instead of one and sometimes it even omits some of the characters on the text file. This might be a bug in the WebView (not sure though).

I recommend using the following configuration for the Webview in order to accomplish the zooming and scrolling gestures, as well as the proper font size.

WebView web = (WebView) findViewById([url removed, login to view]);

[url removed, login to view]().setBuiltInZoomControls(true);

[url removed, login to view]().setUseWideViewPort(true);

[url removed, login to view]().setFixedFontFamily("monospace");

[url removed, login to view]().setFantasyFontFamily("monospace");

[url removed, login to view]().setLoadWithOverviewMode(true);

[url removed, login to view]().setTextZoom(8);

[url removed, login to view]().setMinimumFontSize(4);

[url removed, login to view]().setMinimumLogicalFontSize(2);

The font used must be a Monospace font. You can use "Monospace" which is built-in in Android OS, or preferably you can use Lucida Console, which I provide in the files of this post. To get a better understanding of what I want to accomplish, please open the files mentioned above with a text editor capable of zooming in and out the text. Set the font to Lucida Console, and disable the word wrap option. As you zoom out, you will see that the text becomes a picture made with ASCII characters. That's what I want to see in the phone.

You must turn in the full project developed in JAVA, preferably using Eclipse ADT (NO XAMARIN OR PHONEGAP OR anything else). Your code must be a poem. That is, variable names must be well chosen --self explanatory. Comments must be used if you think something can be confusing. If you need to reuse code, please use functions. Be organized since I will have to read the code later on.

Skills: Android, Java, Mobile App Development

See more: android webview txt files, android show text webview, android setfixedfontfamily, setfixedfontfamily, webview settextzoom, android webview word, android display txt webview, webview font, android setfantasyfontfamily, android webview text file, android webview text line, webview setfantasyfontfamily setfixedfontfamily, word for android, word app for android, which line is not used in graphic design, what is java and why do i need it, what is android os, what android phone should i get, web editor responsive design, web editor app, web design scroll picture, some i can get a font design, responsive web editor, poem to get your ex back, names of android phone web design app

About the Employer:
( 0 reviews ) Miami, United States

Project ID: #4905445

Awarded to:


I have sufficient experience in Android Programming which allows me to fit perfectly for the project

$35 USD in 3 days
(0 Reviews)

4 freelancers are bidding on average $51 for this job


hello, i have checked ur requirement, i have a question to ask regarding that, hope to discuss with u. do u have time to give me a little attention, i am a professional programmer to handle this kinda jobs, and i am More

$75 USD in 3 days
(7 Reviews)

Hi Sir , i am interested into your Project. i have gone through such type of Problem. I can Develop for you that. here are the links of my previous work [url removed, login to view] More

$80 USD in 1 day
(3 Reviews)

Hello I am well experienced android and web developer I can do this for you in a timely manner you can also view samples of my work at [url removed, login to view] [url removed, login to view]

$55 USD in 3 days
(2 Reviews)

I can do this, I'm a Test Driven Development - CleanCoder user. I assure you the code will be easy to read and easy to prove.

$35 USD in 3 days
(0 Reviews)