Metrics.density returns 0 on device

17 views
Skip to first unread message

kded...@gmail.com

unread,
Oct 2, 2017, 5:44:22 PM10/2/17
to Kivy users support
In my application I use Metrics.density to properly scale it.

But although it works fine on desktop, running application on device crashes because Metrics.density equals zero.

I've tested on several android devices with the same result. What could the possible cause of this strange behavior?

Interesting that previous build of my application (created in March'17) works just fine with the same scaling techniques. Since the last build I've just add a couple of custom modules with new screens, nothing that could possibly harm scaling.

kded...@gmail.com

unread,
Oct 3, 2017, 6:41:49 AM10/3/17
to Kivy users support
Moreover, dp() and sp() methods of kivy.metrics return 0 on any input value

Alexander Taylor

unread,
Oct 3, 2017, 1:20:15 PM10/3/17
to Kivy users support
Did your previous (working) build use the same version of Kivy? I wonder if there has been a regression here.

Konstantin Dedyukhin

unread,
Oct 3, 2017, 1:26:45 PM10/3/17
to kivy-...@googlegroups.com
My previous version was build with 1.9.1. 

Current version initially was build with 1.9.1 (when I get this strange behavior). Then I updated to 1.10.1 with the same result

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/U191KaOyZNg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kded...@gmail.com

unread,
Oct 23, 2017, 3:50:53 AM10/23/17
to Kivy users support
Is anything happening on this issue?

Any ideas how can I fix this?

вторник, 3 октября 2017 г., 20:26:45 UTC+3 пользователь Konstantin Dedyukhin написал:
Reply all
Reply to author
Forward
0 new messages