QPrompt-Teleprompter icon indicating copy to clipboard operation
QPrompt-Teleprompter copied to clipboard

Allow to rotate text 90 degrees

Open Miguel-Rodrigues opened this issue 2 years ago • 3 comments

The camera app that comes built-in Xiaomi MIUI does not rotate, locking the screen rotation in the portrait orientation. This means if I use QPrompt as a floating window over the camera app, the text appears rotated 90 degrees when shooting in landscape orientation.

Is it possible to add a setting to rotate text 90 degrees? This feature could be available at: Three dots menu > flip settings > 90° Rotation

Alternatively would it be possible to create a widget that floats over the rest of the UI, that assumes whatever rotation the phone/tablet os orientated.

In attachment show a practical example of the current behaviour.

Best regards!

Screenshot_2022-04-03-16-21-51-362_com android camera

Miguel-Rodrigues avatar Apr 03 '22 15:04 Miguel-Rodrigues

Thank you for your interest in the Android version of QPrompt. I'm looking forward to improve the Android experience, for it's the version that needs most care right now.

Is it possible to add a setting to rotate text 90 degrees?

Wrote some test code, because I had my doubts, but yes! It is possible to add this option.

image

Alternatively would it be possible to create a widget that floats over the rest of the UI, that assumes whatever rotation the phone/tablet os orientated.

I had looked into this before. Code-wise, these are two separate features:

  1. Automatic phone orientation detection: This feature is complete, QPrompt sets its orientation according to Android's indication. Nevertheless, some phones fail to notify apps of their orientation, or you get situations like yours, where another app blocks the phone into one orientation. This means QPrompt should provide an option to force one specific orientation. This orientation could be enforced at the OS level, requesting to lock the orientation manually; or at the app level, rotating only the prompter's contents. (See first picture.) The disadvantage of doing it at the OS level is that it may conflict with your camera app, which is locking the orientation for a reason. Meanwhile, the disadvantage of doing it at the app level is you'd have the speed and toggle buttons at the side instead of the bottom.

What do you think of these two approaches?

image

  1. A widget-like view that can be overlaid over other concurrent apps: This feature is harder to implement for it relies on native Android code that gets executed during runtime, and requires refactoring some of the existing code, to keeps things maintainable long term. Nevertheless, I plan to add this feature in the future, for it is difficult to lay QPrompt on top of another app in most Android environments.

Cuperino avatar Apr 03 '22 19:04 Cuperino

Hello, @Cuperino. I think in resource/time concerns, the first option is the most optimal since it is already supported by the app engine, and it already supports floating windows. It is not the greatest use case since you either overlay more than half of the screen camera, or it becomes so small at a corner that you may not be able to read properly, as you cannot resize the floating window to a proper size that would allow to read the teleprompter and view most of the screen... This camera app is weird... It locks the system orientation but rotates the the Icons for a seamless transition between orientations and does not support split screen feature or create a screenshot. Ultimately the best case is using two independent devices, one for camera and the other as teleprompter.

The second alternative, I understand the technical implications of implementing a floating widget that works regardless of system orientation. Could be something for the future, as the first approach is good enough for most uses, using selfie camera. One possibility would look like a scrolling subtitle that fades in and out of view, with control buttons at the left, bottom or right of the text, depending of the orientation, over a semi transparent background.

Best regards.

Miguel-Rodrigues avatar Apr 04 '22 00:04 Miguel-Rodrigues

Feature partially implemented for next release.

Cuperino avatar Jul 18 '22 23:07 Cuperino