Screen orientation on Raspberry Pi 3 with Android things

前端 未结 3 2009
太阳男子
太阳男子 2020-12-09 20:26

I\'ve just bought a Raspberry Pi 3 with a 7\" Display touch screen and a casing.

Unfortunately, the casing can\'t allow me to rotate manually the screen so my apps a

相关标签:
3条回答
  • 2020-12-09 21:03

    Try this:

    if (Build.DEVICE.equalsIgnoreCase("rpi3"))
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
    
    0 讨论(0)
  • 2020-12-09 21:12

    I find out finally how to achieve it.

    Solution found there : Android Things with Rasp3 7 inch touchscreen

    You have to mount the boot partition from the sdcard on your laptop and edit the /boot/config.txt file and add the following line:

    lcd_rotate=2
    

    By adding this line both display and touchscreen will be rotated, compared to display_rotate=2 where only display is rotated and touchscreen remains upside down.

    0 讨论(0)
  • 2020-12-09 21:15

    Google added new APIs in DP6 to control device settings, including display orientation: Android Things uses three different APIs to control settings for the screen (display), system time, and available locales.

    Please open a new bug if these APIs do not behave as you expect.

    0 讨论(0)
提交回复
热议问题