Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotation buggy in tablet UI #4383

Open
4 tasks done
Raul1198 opened this issue Oct 4, 2020 · 30 comments
Open
4 tasks done

Rotation buggy in tablet UI #4383

Raul1198 opened this issue Oct 4, 2020 · 30 comments
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface player Issues related to any player (main, popup and background)

Comments

@Raul1198
Copy link

Raul1198 commented Oct 4, 2020

Checklist

Steps to reproduce the bug

  1. Open any video
  2. Play it
  3. Press the Full Screen bottom right box icon to go into landscape
  4. Again press the box button to go into full screen
  5. Press the full screen button to go back to the previous orientation

Actual behaviour

NewPipes UI is now In Landscape orientation (auto rotation for the device is locked i.e. in Portrait mode)

Expected behavior

NewPipe should have rotated back to Portrait after closing (pressing the full screen box button) the video

Screenshots/Screen recordings

Screenshot_20201004-213354964

Screenshot_20201004-213404832

Logs

@Raul1198 Raul1198 added the bug Issue is related to a bug label Oct 4, 2020
@comradekingu
Copy link
Contributor

Are you sure it is not just rotation that is locked?

@opusforlife2
Copy link
Collaborator

The user did mention it:

(auto rotation for the device is locked i.e. in Portrait mode)

@Raul1198 The checklist is given there for you to go through and tick as you do each item.

@Raul1198
Copy link
Author

Raul1198 commented Oct 4, 2020

Are you sure it is not just rotation that is locked?

Yes I'm sure

@fourstepper
Copy link

I am experiencing the same.

The best behaviour from my point of view would also be the ability to use the usually appearing button to switch from landscape to portrait (the below button)

Screenshot_20201004-194936_YouTube

@blackbox87
Copy link

blackbox87 commented Oct 4, 2020

You've obviously got the larger tablet UI active on your device, but on most phones step 4 isn't required because when you press on the fullscreen/rotate button (while locked to portrait mode) it'll automatically go into fullscreen landscape mode. And if you press on your navbars back button or the fullscreen/rotate button then it'll revert you back to portrait mode.

Having said all of that, I did find a way to make most phones get stuck in landscape too.

  1. With your phones orientation locked to portrait mode play a video
  2. Press the fullscreen/rotate button to have the video played in fullscreen landscape
  3. Skip to the end of the video and then press the X button at the top left of the screen

You'd expect it to return you to portrait mode, but instead you remain in landscape and can't switch back to portrait until you start another video and press the fullscreen/rotate button.

@fourstepper During development I pointed out that the auto-rotate setting often isn't respected and said that people might complain about the merged fullscreen/rotate button because it gives you less control. Unfortunately there's conflicting opinions on how it should be handled though, which is why it's so different in v0.20.0.

@opusforlife2 opusforlife2 added GUI Issue is related to the graphical user interface player Issues related to any player (main, popup and background) labels Oct 5, 2020
@avently
Copy link
Contributor

avently commented Oct 5, 2020

Tablets have different screen aspect and screen size. For example, you can have a large 10" tablet or even larger. It's not a good idea to rotate this giant device back and forth

@Raul1198
Copy link
Author

Raul1198 commented Oct 5, 2020

Tablets have different screen aspect and screen size. For example, you can have a large 10" tablet or even larger. It's not a good idea to rotate this giant device back and forth

Right. Btw the above screenshot are of smartphone

@avently
Copy link
Contributor

avently commented Oct 5, 2020

Ah, but this ui for large screens in landscape. So Android selected this UI for your device because it has ~600dp which is a sign of tablet. I use the DPI setting to enable tablet ui for my phone. Why do you have a large DPI on you phone? And what DPI you have in Developer settings?

@Raul1198
Copy link
Author

Raul1198 commented Oct 5, 2020

Ah, but this ui for large screens in landscape. So Android selected this UI for your device because it has ~600DPI which is a sign of tablet. I use the DPI setting to enable tablet ui for my phone. Why do you have a large DPI on you phone? And what DPI you have in Developer settings?

I use the smaller available in my display size to see more content at once, the dpi is 561 .

@wb9688
Copy link
Contributor

wb9688 commented Oct 5, 2020

@avently: Not DPI, DPI is totally irrelevant. What matters is the amount of dp.

@avently
Copy link
Contributor

avently commented Oct 5, 2020

@Raul1198 that's the answer. If you make the value smaller most of apps will think that you have a phone instead of tablet because it's how android decides (based on amount of that value). So the layout you see is chosen by android after orientation change and nothing we can do here.
If you still want to see such tablet ui on a phone but to get phone-like behavior it can be implemented using a setting. Something like: Preferred app behavior: for phones, for tablets.

There is some places when the behavior differs from these form factors.

@Raul1198
Copy link
Author

Raul1198 commented Oct 6, 2020

@Raul1198 that's the answer. If you make the value smaller most of apps will think that you have a phone instead of tablet because it's how android decides (based on amount of that value). So the layout you see is chosen by android after orientation change and nothing we can do here.
If you still want to see such tablet ui on a phone but to get phone-like behavior it can be implemented using a setting. Something like: Preferred app behavior: for phones, for tablets.

There is some places when the behavior differs from these form factors.

Yes, btw how come 0.19.8 works fine with that dpi

@avently
Copy link
Contributor

avently commented Oct 6, 2020

Yes, btw how come 0.19.8 works fine with that dpi

0.19.8 doesn't have per form factor optimization

@JeongJuhyeon
Copy link

@fourstepper During development I pointed out that the auto-rotate setting often isn't respected and said that people might complain about the merged fullscreen/rotate button because it gives you less control. Unfortunately there's conflicting opinions on how it should be handled though, which is why it's so different in v0.20.0.

Bug of getting stuck in landscape + the merged button have made me revert to 0.19. I thought the latter was a bug too but apparently it's intended then? I guess everyone has their own preferences but for me a 1-click fullscreen button is a must.

@fourstepper
Copy link

Bug of getting stuck in landscape + the merged button have made me revert to 0.19. I thought the latter was a bug too but apparently it's intended then? I guess everyone has their own preferences but for me a 1-click fullscreen button is a must.

I think this is a major fail, breaking the standard UX of interacting with Android apps which use full screen and landscape

@Raul1198
Copy link
Author

Raul1198 commented Oct 6, 2020

@fourstepper During development I pointed out that the auto-rotate setting often isn't respected and said that people might complain about the merged fullscreen/rotate button because it gives you less control. Unfortunately there's conflicting opinions on how it should be handled though, which is why it's so different in v0.20.0.

Bug of getting stuck in landscape + the merged button have made me revert to 0.19. I thought the latter was a bug too but apparently it's intended then? I guess everyone has their own preferences but for me a 1-click fullscreen button is a must.

+1 I'm also back to 0.19

@hipunk
Copy link

hipunk commented Oct 6, 2020

Same problem here on a 5" device. It's stuck in horizontal mode when exiting fullscreen.

@avently
Copy link
Contributor

avently commented Oct 7, 2020

All of you who says "I'm stuck in landscape" don't understand the reason probably. Let's listen this reason.

All of you have a custom device width size selected from developer settings. You made Android thinking that you have a tablet. So all apps thinks that you have a tablet. NewPipe reacts differently after pressing on fullscreen button on tablets and phones
on phones it rotates the device but on tablets (in landscape) it switches from fullscreen to non-fullscreen and back. Why? Because tablets can be comfortably used in landscape in non-fullscreen and in fullscreen. It would be terrible to rotate a large screen into portrait and back after every click on fullscreen button.
I can only suggest this

If you still want to see such tablet ui on a phone but to get phone-like behavior it can be implemented using a setting. Something like: Preferred app behavior: for phones, for tablets.

Or to bound fullscreen button to long click which will allow to force rotate the orientation. If you have others ideas, show them

@JeongJuhyeon
Copy link

JeongJuhyeon commented Oct 8, 2020

on phones it rotates the device but on tablets (in landscape) it switches from fullscreen to non-fullscreen and back. Why? Because tablets can be comfortably used in landscape in non-fullscreen and in fullscreen. It would be terrible to rotate a large screen into portrait and back after every click on fullscreen button.

I'm not sure why you feel this way but I can't agree with this at all. I use a tablet. The pre-0.20 way of rotating after clicking the fullscreen button was intuitive and convenient. There was nothing uncomfortable about it - I'm pressing full-screen because I want actual full-screen, which on mobile devices involves rotation given >99% of content is made for landscape. Assuming that a user who presses full-screen doesn't actually want full-screen is very.. Apple, and very unlike Newpipe. On a tablet on v0.20.0, after Newpipe has rotated to landscape, it's a pain to get out of it. I have to manually turn rotation on, make it switch to portrait again, and then turn rotation off again.

@opusforlife2
Copy link
Collaborator

Back button doesn't work in your case?

@hipunk
Copy link

hipunk commented Oct 8, 2020

All of you have a custom device width size selected from developer settings. You made Android thinking that you have a tablet. So all apps thinks that you have a tablet.

  1. That assumption is wrong. I know tablet UI and I don't have it.
  2. Only Newpipe 0.20.0 is effected. Other apps work in phone mode.
  3. It is doing this on 2 of my devices, none of them a tablet.
  4. A 5" to 6" phone isn't a tablet, no matter what which component interprets.

Here's a suggestion: Put a manual setting up that enables tablet mode for users who want it and disables it for everyone else, similar to how Opera Mini does it.
I can't get it back to portrait at all without leaving the app, the OS rotation setting is apparently ignored?

@opusforlife2
Copy link
Collaborator

Can one or more of the users facing the rotation issue and/or the tablet UI issue post a screenrecord?

@avently
Copy link
Contributor

avently commented Oct 8, 2020

@opusforlife2 you don't need a screenrecord. Just go to developer settings, change minimum display width (or whatever it's called in English locale) to 600 and try to use the app

@opusforlife2
Copy link
Collaborator

opusforlife2 commented Oct 8, 2020

Ah. That's weird, indeed.

  1. You're locked in portrait.
  2. When you tap on the full screen button, the app just switches to landscape without going full screen. <--- why does this happen? If the OS expects tablet mode, the app should always show in landscape, shouldn't it? Or, since you're locked in portrait, the app shouldn't go to landscape at all unless you're in fullscreen, same as phone UI.
  3. Another tap on the full screen button actually takes you to full screen. But now neither the full screen button nor the back button let you go back to portrait. For that you need to unlock rotation and tilt the phone back upright.

Possible mitigation for 0.20.1: since the OS is locked to portrait, can the back button be coded to take you back to portrait? Until then we can keep thinking of solutions.

Possible solution: If the OS is locked to portrait, make the app always show phone UI. Leave tablet UI for landscape orientation.

@hipunk
Copy link

hipunk commented Oct 9, 2020

Quoting myself:

It's stuck in horizontal mode when exiting fullscreen.
I can't get it back to portrait at all without leaving the app, the OS rotation setting is apparently ignored?

I revise that statement, unlocking rotation works now (after a reboot :o) ). However I still need to unlock OS rotation before it goes back to portrait mode again, so now it behaves exactly like opusforlife2 described it. Please excuse my mistake.

@opusforlife2 opusforlife2 changed the title Rotation Rotation buggy in tablet UI Oct 18, 2020
@newhinton
Copy link

I dont know if this is actually the same bug, but it sounds like it.
(Portraitmode, press button to switch to Landscape, now stuck in landscape because rotation-button does not work UNTIL you manually rotate the device back, only then the proper orientation is used)

What i found out while investigating this:

activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
works as intended.

activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE);
does not. To actually apply this, the device needs to be rotated physically, only then the orientation is updated.

@drundridge
Copy link

drundridge commented Mar 16, 2021

Has anyone found a reliable way to force the DP/DPI settings of Newpipe to be low/high enough to avoid tablet detection and becoming being stuck in landscape as a result?
Changing NewPipe's DPI with Xposed App Settings has no effect on this behaviour. I can't find a way to force NewPipe to render in an 800x600 DP or whatever the maximum phone resolution may be.
Forcing Auto Rotate works well enough as a workaround.

@Dakkaron
Copy link
Contributor

I wish there was something like that. It would be really nice if there was a switch in the settings that lets you switch between tablet and phone UI.

This app is the only one with such a screwed up tablet UI behaviour...

@Raul1198
Copy link
Author

Raul1198 commented Apr 11, 2021

Here in this fork there's an option to force full screen mode irrespective of tablet or tv - https://github.com/polymorphicshade/NewPipe

@moriel5
Copy link

moriel5 commented Jul 21, 2021

I have seen this happen on phones, even on the newest version with tablet mode disabled.

The orientation outside of fullscreen video is forced to portrait, with the manual rotation icon never appearing, and the only way to fix this is by turning on autorotate, rotating, and turning off autorotate again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug GUI Issue is related to the graphical user interface player Issues related to any player (main, popup and background)
Projects
None yet
Development

No branches or pull requests

14 participants