Author Topic: Show entire Page on screen  (Read 33830 times)

timyap

  • Newbie
  • *
  • Posts: 2
Show entire Page on screen
« on: December 10, 2012, 02:11:14 pm »
Currently, on my phone, if the email has a picture header or contains a picture, I need to scroll around to see the full picture. I am not able to zoom out beyond a certain level.

The latest version of Gmail opens a mail with the entire picture fitted to the width of the screen. Hope Aeromail can have this feature too.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Show entire Page on screen
« Reply #1 on: December 12, 2012, 03:43:49 am »
Well, I tried and I tried and I tried...

... and when it looked like it more or less worked, I realized that I'm unable keep unscaled those messages that don't need scaling (and can wrap).

So the short answer is no, I don't know how to do this.

Probably some kind of CSS trick of server side HTML pre-processing (which Gmail already does for the web site).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

timyap

  • Newbie
  • *
  • Posts: 2
Re: Show entire Page on screen
« Reply #2 on: December 13, 2012, 02:16:31 am »
Thanks for the effort!

tft

  • Newbie
  • *
  • Posts: 10
Re: Show entire Page on screen
« Reply #3 on: December 19, 2012, 11:49:45 am »
I too see this as an issue, attached are sample screenshots from both EE
and AquaMail showing the same email.  Ideally AquaMail should show a
"full" view allowing the user to pinch in order to zoom in as needed in lieu
of the current behavior which seems zoomed in without the ability for one
to zoom out for a full email view.

Hope this helps.

Thanks...

doctorow

  • Jr. Member
  • **
  • Posts: 87
Re: Show entire Page on screen
« Reply #4 on: December 20, 2012, 05:28:25 am »
Kostya, did you try to initially render the mail in zoomed out mode? Something like this when you create the webview:

Code: [Select]
WebSettings localWebSettings = this.mWebView.getSettings();
localWebSettings.setJavaScriptEnabled(true);
localWebSettings.setUseWideViewPort(true);
localWebSettings.setLoadWithOverviewMode(true);
localWebSettings.setSupportZoom(true);
localWebSettings.setBuiltInZoomControls(true);
localWebSettings.setDisplayZoomControls(false);

And/or did you play with WebSetting.Zoomdensity which is available since API Level 7? webview.getSettings().setDefaultZoom(WebviewSetting.ZoomDensity.FAR) perhaps?

You may also want to look at this code from the Google Email client:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.1_r1/com/android/email/activity/MessageViewFragmentBase.java

Specifically, search for ZOOM_SCALE_ARRAY in the code.

In 4.1.1, the zoom code changed somewhat:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/email/activity/MessageViewFragmentBase.java#MessageViewFragmentBase.getWebViewZoom%28%29

Here it stores the zoom levels as offsets into R.array.general_preference_text_zoom_size.

Perhaps some of this is of some help.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Show entire Page on screen
« Reply #5 on: December 25, 2012, 03:12:43 am »
Thanks for the suggestion.

Yes, I've tried this, and there are two issues:

1 - I let the user adjust font size, using:

WebSettings settings = webView.getSettings();
settings.setTextSize(textSize);

When this is combined with "overview mode" and "wide viewport", changing the font size makes WebView content jump around in a very ugly way.

I'll check if using setTextZoom has the same issue.

2 - Being able to tell which messages need zooming and which do not.

It's easy enough to skip "overview mode" for text/plain, but there are some text/html messages (in fact, most) that can be wrapped by WebView while rendering, so overview mode is not required. I'm concerned that enabling overview mode for these messages that wrap will just create more annoyance for the user.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Show entire Page on screen
« Reply #6 on: December 26, 2012, 03:15:20 am »
Ok, so I looked at the code there and tried to copy it into my app, hoping to get the fit to screen to work. Didn't help.

Then I configured one of my accounts in the stock Email (Galaxy Nexus, 4.2.1):

1 - Wide HTML messages scroll sideways, just like in my app.
2 - I can zoom in, but not out, just like in my app (this worked on Android 2.*).

Android WebView can be configured to "load in overview mode". Sounds simple enough, but the third screenshot shows what happens on the same Galaxy Nexus. The message is fitted to about 2/3 of the available screen width.

So again, I would really love to have this function, but this is one of those things that should take a couple of lines of code, but in practice...
« Last Edit: December 26, 2012, 03:27:39 am by Kostya Vasilyev, Aqua Mail »
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

doctorow

  • Jr. Member
  • **
  • Posts: 87
Re: Show entire Page on screen
« Reply #7 on: December 26, 2012, 02:06:12 pm »
Ouch. I definitely see the problem. Thanks for looking into it though!

tft

  • Newbie
  • *
  • Posts: 10
Re: Show entire Page on screen
« Reply #8 on: December 27, 2012, 12:42:04 pm »
Yes, I've tried this, and there are two issues:

1 - I let the user adjust font size, using:

WebSettings settings = webView.getSettings();
settings.setTextSize(textSize);

When this is combined with "overview mode" and "wide viewport", changing the font size makes WebView content jump around in a very ugly way.

I'll check if using setTextZoom has the same issue.

2 - Being able to tell which messages need zooming and which do not.

It's easy enough to skip "overview mode" for text/plain, but there are some text/html messages (in fact, most) that can be wrapped by WebView while rendering, so overview mode is not required. I'm concerned that enabling overview mode for these messages that wrap will just create more annoyance for the user.

Hi, would giving the user the option to select "overview" view (or "full width")
on a per email via a select button/menu-item (or similar) be possible ?  In other
words, give the user the ability to switch the view as he/she pleases yet have
the app default to the current way AquaMail does it now.

In many instances I get emails with banners, tables, etc in them and would
very much like to see the "entire width" of the email as I scroll down in lieu
of scrolling right/left _and_ down which gets confusing rather quickly.

As always, thanks for your time and efforts !

Thanks.

Colin_S

  • Newbie
  • *
  • Posts: 13
Re: Show entire Page on screen
« Reply #9 on: January 04, 2013, 02:08:57 pm »
This is a really annoying bit about android, wish you could fix it.

frogworth

  • Newbie
  • *
  • Posts: 13
Re: Show entire Page on screen
« Reply #10 on: January 26, 2013, 01:23:21 pm »
I didn't realise how hard this was on Android. to be honest it's one of the only annoying things about Aqua-Mail. But maybe it's the same in other clients. Still, anything you could do would be appreciated!

Hafstrøm

  • Newbie
  • *
  • Posts: 3
Re: Show entire Page on screen
« Reply #11 on: March 04, 2013, 09:58:23 pm »
Hi Kostya,

Perfect app, apart from the missing fit to screen feature. Have just bought the Pro key. Thanks for all your work. Perhaps you will find a solution to this problem in an inspired moment in the future.

Best regards from Copenhagen

Henrik Hafstrøm

opimitti

  • Newbie
  • *
  • Posts: 2
Re: Show entire Page on screen
« Reply #12 on: March 16, 2013, 01:40:01 am »
Hi Kostya,
Congratulations for the app, probably the best email client in Android. I have just purchased the Pro key.
The only annoying thing I have found so far is this missing "fit to screen". I am confident you will end up finding the solution for this!
Best Regards
Giovanni Opimitti
Livonia, Michigan - USA

wernst

  • Newbie
  • *
  • Posts: 5
Re: Show entire Page on screen
« Reply #13 on: March 20, 2013, 03:09:06 am »
Doesn't the "Mobile View" command do pretty much what you want, that is, re-renders and resizes the email and images to fit the screen width?

Oh how I wish and wish there was a button on the button bar (at the bottom of the screen while viewing a mail) that was a quick toggle of Mobile View. As it stands, I need to tap Menu, then View, and then Mobile View - 3 clicks! - which is a royal pain.

-Warr

Hafstrøm

  • Newbie
  • *
  • Posts: 3
Re: Show entire Page on screen
« Reply #14 on: April 09, 2013, 04:01:13 am »
You did manage to solve this issue with the auto fit. Well done. Now aquamail is number one for sure