Hi,
I am working on my first Android project (for studying purposes). It's
a simple file browser. One thing which needs implementing is an
Activity which shows TXT (xml, css, txt, html...) and IMAGES (jpeg,
png, gif...) when the user clicks on the file.
From what I have read (I am really new to Android, just a couple of
days learning it) the WebView component seems to fit the bill.
But I have a few questions about it:
1) What are the MIME types supported by WebView (regarding TXT and
IMAGE files)?
2) How to show XML, HTML, CSS as text? Just by setting "text/plain" ?
If I could get any kind of formatting it would be even better.
3) How to zoom the image and text (is multi-touch enabled by default
if the devices supports it?)? Is it a WebView built-in feature?
4) How to properly scale the images so that I have a good trade
between image quality and performance?
5) Can I set it to full screen? I don't want to see any control, just
the IMAGE/TEXT and the chance to zoom in and out and scroll if needed.
I could go back to the file browser by hitting the BACK BUTTON.
Any other thought?
Regards
I am working on my first Android project (for studying purposes). It's
a simple file browser. One thing which needs implementing is an
Activity which shows TXT (xml, css, txt, html...) and IMAGES (jpeg,
png, gif...) when the user clicks on the file.
From what I have read (I am really new to Android, just a couple of
days learning it) the WebView component seems to fit the bill.
But I have a few questions about it:
1) What are the MIME types supported by WebView (regarding TXT and
IMAGE files)?
2) How to show XML, HTML, CSS as text? Just by setting "text/plain" ?
If I could get any kind of formatting it would be even better.
3) How to zoom the image and text (is multi-touch enabled by default
if the devices supports it?)? Is it a WebView built-in feature?
4) How to properly scale the images so that I have a good trade
between image quality and performance?
5) Can I set it to full screen? I don't want to see any control, just
the IMAGE/TEXT and the chance to zoom in and out and scroll if needed.
I could go back to the file browser by hitting the BACK BUTTON.
Any other thought?
Regards