Author Topic: AquaMail and custom dpi  (Read 6389 times)

beerlao

  • Newbie
  • *
  • Posts: 42
AquaMail and custom dpi
« on: June 23, 2014, 10:49:52 pm »
Hi,

I'm using AquaMail on a Samsung Galaxy S5 and I recently changed the systemwide density from 480 DPI (stock) to 380. After doing this AquaMail stops showing the little triangles in Account list that are used to expand the folders. I had the same problem when using a custom DPI on the S3, but there I was able to find a setting in xposed app settings that brought those triangles back. Please see attached screenshot. Is there anything I could do to use AquaMail with custom dpi settings and have those triangles?


Gesendet von meinem SM-G900F mit Tapatalk


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AquaMail and custom dpi
« Reply #1 on: June 23, 2014, 11:18:33 pm »
The account list uses a standard Android component, called ExpandableListView.

The expand / collapse icons on the left are also provided by the system.

My code hides them when the width of the account list is smaller than a certain number, but it's really a pretty narrow value, don't think you're hitting it.

How wide is your screen, in logical units, at 380 dpi? (was that supposed to be 360, by the way?)
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/

beerlao

  • Newbie
  • *
  • Posts: 42
Re: AquaMail and custom dpi
« Reply #2 on: June 23, 2014, 11:30:38 pm »
I changed to 360 and that brought back the triangles :-) AquaMail switched to tablet view and I could force it into phone view with app settings. Thank you for your quick reply, that's exactly what I wanted :-)

Gesendet von meinem SM-G900F mit Tapatalk


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AquaMail and custom dpi
« Reply #3 on: June 24, 2014, 09:51:31 pm »
Glad I was able to help -- still not sure what was going on, but from an application's point of view the DPI doesn't matter... It's logical units everywhere.
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/

beerlao

  • Newbie
  • *
  • Posts: 42
Re: AquaMail and custom dpi
« Reply #4 on: June 24, 2014, 10:16:04 pm »
If you tell me how I can figure out the width of my screen in logical units I will be happy to tell you. My phone has a 1080p Display (1920x1080px) and a stock density of 480 DPI. When setting the DPI to 380 the problem occurs while setting it to 360 just works fine. Does that help?

Gesendet von meinem SM-G900F mit Tapatalk

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AquaMail and custom dpi
« Reply #5 on: June 24, 2014, 10:29:57 pm »
The "reference" density is 160 dpi, do you remember Android phones with 3.2" screens, running at 320*480 pixels?

When you have triple the density at 480 dots per inch, and 1080 pixels (dots), recalculating to 160 dots per inch gives:

1080 * 160 / 480 =  360 logical units, which is pretty close to 320 logical units on those old 3.2" screens (and this is not a simple coincidence).

Another example: 1280 * 720 at 320 dpi, e.g. the Galaxy Nexus.

720 * 160 / 320 = 360 logical units again, and again, it's not a coincidence.

So screens on Android *phones*, over time, keep having pretty much the same logical size. This is important, since all layout (where things are relative to one another) is done in logical units, and more pixels just makes things more sharp.

At 380 dpi, your phone's screen width was 1080 * 160 / 380 = 454 logical units. Too little for a tablet (those start at 600), but unusually large for a phone class device.

Now at 360 dpi, it's 1080 * 160 / 360 = 480. As it turns out, that's the smallest size at which two panel layout is enabled in Aqua.

( BTW - when working on graphics, I have to do these conversions all the time, and not with nice round numbers... )
« Last Edit: June 24, 2014, 10:31:44 pm 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/

beerlao

  • Newbie
  • *
  • Posts: 42
Re: AquaMail and custom dpi
« Reply #6 on: June 25, 2014, 01:27:36 am »
I see, nice explanation, thank you :-) But it doesn't explain why your code hides the expand/collapse icons when set to 380 DPI, right?
« Last Edit: June 25, 2014, 09:31:33 am by beerlao »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: AquaMail and custom dpi
« Reply #7 on: June 26, 2014, 06:48:33 pm »
The threshold in my code is at about 200dp, so it should *not* be hiding the icons...

Something's obviously happening, but I'm not sure what it is.
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/

beerlao

  • Newbie
  • *
  • Posts: 42
Re: AquaMail and custom dpi
« Reply #8 on: June 26, 2014, 10:47:37 pm »
Ok, never mind, you have much more important things to work on, that's just an cosmetic issue on non-supported (rooted) devices. Thanks again!