I solved the problem of the lack of a portrait/landscape hardware button on
Android.
On an iPad iOS tablet, if you want to lock the screen to portrait or to
landscape mode, you just flip a configurable hardware button, but that
portrait/landscape mode lock doesn't exist on my Android phone.
On my Android 4.3 phone out of the box, all I can do is enable or disable
screen rotation.
Some programs, such as VLC, have a software lock, so that when you're
watching a video in bed, holding the phone above or to the side, the mode
doesn't keep flipping accidentally from portrait to landscape as you change
positions.
However, other programs, such as the Youtube app (and even the far better
youtube replacement app, NewPipe) don't have this software lock; so the
screen flips annoying from landscape to portrait mode as you move the
phone.
Luckily, there's a free KISS app designed to solve this problem:
* Rotation Lock+Landscape (org.cmotc.tools.rotationlockpp)
*
https://f-droid.org/wiki/page/org.cmotc.tools.rotationlockpp
It's an app that is so simple, there is no user interface; you simply hit
the button to toggle the mode in series to one of these 3 possible modes:
a. Portrait Orientation Locked
b. Landscape Orientation Locked
c. Orientation Unlocked
Note: In addition, I use Nova free as my launcher, which can lock the
desktop screen in portrait mode, so that I have the best of all worlds:
a. I lock the desktop screen to portrait mode using Nova free settings
b. I turn on the Android settings > display > auto rotate screen
c. When I watch a video in bed, I press "Rotation Lock+Landscape"
These three actions (two of which you normally set only once) work fine in
*all* apps to lock them to landscape mode when watching videos in
situations where the orientation changes frequently (such as when holding a
video while watching youtube/newpipe videos in bed).
This solution is even better than the hardware button on my iOS iPad,
simply because the iOS hardware button doesn't allow you to have one mode
for the desktop and a different mode for the apps, although it's not as
annoying on a typical tablet simply because the aspect ratio isn't as
different between the two modes as it is on a typical phone.