buildozer.spec file rotation - need landscape, but flip 180 degrees

324 views
Skip to first unread message

Brent Picasso

unread,
Jun 22, 2015, 1:24:59 PM6/22/15
to kivy-...@googlegroups.com
Hi,

For our android build I have the buildozer.spec orientation set to 'landscape' mode, but the app remains upside down when the device is flipped 180 degrees.  I was expecting the app to rotate, but remain in landscape mode.

Am I missing something else, or does Kivy not currently support 180 degree rotation?

Thank you,
Brent


Alexander Taylor

unread,
Jun 23, 2015, 6:24:10 AM6/23/15
to kivy-...@googlegroups.com
'landscape' means the primary landscape direction of the device. You want to set the screenOrientation token to 'sensorLandscape', but I'm not sure if buildozer lets you do this directly. If not, you could open an issue on github about it.

Even if you can't conveniently do that, you can set the orientation setting by calling the android api with pyjnius. This is now available in plyer (https://github.com/kivy/plyer), something like plyer.orientation.set_sensor('landscape')

Brent Picasso

unread,
Jun 23, 2015, 11:23:28 AM6/23/15
to kivy-...@googlegroups.com
Thanks, Alexander - I'll check that out. Wonder if I could submit that as a PR to include it natively. Guessing that's handled through python for android, buried somewhere here in the Java code? https://github.com/kivy/python-for-android

-Brent



--
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/rcn7YuYGRnE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Brent Picasso
Technology for Race and Street

niavlys

unread,
Jun 23, 2015, 11:50:18 AM6/23/15
to kivy-...@googlegroups.com


Le mardi 23 juin 2015 12:24:10 UTC+2, Alexander Taylor a écrit :
'landscape' means the primary landscape direction of the device. You want to set the screenOrientation token to 'sensorLandscape', but I'm not sure if buildozer lets you do this directly. If not, you could open an issue on github about it.

Alexander Taylor

unread,
Jun 23, 2015, 12:28:24 PM6/23/15
to kivy-...@googlegroups.com
I think with python-for-android you can actually submit precisely the
string you want (e.g. sensorLandscape for you) and it's just pasted in
the template, but buildozer does something extra. I haven't checked that
though.

Either way, I think an improvement here would be welcome.

On 23/06/15 16:23, Brent Picasso wrote:
> Thanks, Alexander - I'll check that out. Wonder if I could submit that
> as a PR to include it natively. Guessing that's handled through python
> for android, buried somewhere here in the Java
> code? https://github.com/kivy/python-for-android
>
> -Brent
>
>
>
> On Tue, Jun 23, 2015 at 3:24 AM, Alexander Taylor
> <alexander...@gmail.com <mailto:alexander...@gmail.com>>
> <mailto:kivy-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Brent Picasso
> *Autosport Labs <http://www.autosportlabs.com>*
> *Technology for Race and Street*
>
> --
> 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/rcn7YuYGRnE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> kivy-users+...@googlegroups.com
> <mailto:kivy-users+...@googlegroups.com>.
signature.asc
Reply all
Reply to author
Forward
0 new messages