Add a control to toggle fullscreen mode
My current problem with fullscreen mode are:
- it's hard to turn it off temporarily, as my tablet don't always detect when I'm trying to drag from the bottom of the screen because of the screen protector
- I usually want to do multiple things, such as "flag and suspend" or "show answer and select answer", but the border layout disappear after the first thing
I think the best solution would be to add a control that would toggle full screen. Ensuring it's easy to get the buttons (and that they remain until toggle again), and that it would be easy to stop having the button if we need more room on the screen.
I tried to take a look at it in https://github.com/Arthur-Milchior/Anki-Android/tree/fullscreen, and I must admit it seems not trivial, given that the settings are read during the creation of the reviewer in order to decide which layout to use, which does not seems like something that can be easily changed, at least not without recreating the view.
However, we can force the button to reappear, in fullscreen mode. Which means that at least half of what I want is possible. Ensuring the button reappear. But I have not yet understood how this work
it's hard to turn it off temporarily, as my tablet don't always detect when I'm trying to drag from the bottom of the screen because of the screen protector
So, is your problem the immersive mode hiding your navigation bar?
I usually want to do multiple things, such as "flag and suspend" or "show answer and select answer", but the border layout disappear after the first thing
just as an option for you, you can use one of the User actions with the javascript API to do multiple things in just one button
The thing is that I would love to have different behavior depending on what I'm reviewing. Hence I'd love to be able to toggle it easily. Admittedly, now that I'm writing this down, I guess having a menu entry for this action would also make sense.
The reason is that, when I'm reviewing a card with a music sheet, I really need as much screen as I can have. So I want full screen. Even if it makes having the buttons slightly harder.
However, when I'm reviewing most other content, I prefer to have an easy access to the button as most of the screen is not used.
Having a gesture to toggle full screen/normal screen would ensure that I don't need to open the settings each time I move from music practice to other practice.
I'm not convinced that this is worth a menu option or bindable command.
The use case here is very specific, you are the only one that has asked for that, and I believe that we could think of other ways to solve your problem.
This sounds too specific to warrant a menu item.
JS API should be feasible, definitely not a menu item
@Arthur-Milchior Would making this a feature in the JS API be acceptable for you?
It would be. I'm surprised honestly that this is too specific, but if you all agree, I won't insist.
Still, I must admit that I've no idea how to implement it. So I'd appreciate if anyone who understands how to switch the fragment between fullscreen and in screen can do it
Anything in the UI: more options confuse users, especially if there's a very niche use case
Most things in the JS API: less confusion, more control for power users
I’d like to investigate this. From the discussion, my understanding is that the accepted direction is a JS API feature to toggle reviewer fullscreen state, rather than adding a UI/menu option.
We're looking into a rewrite of our JS API, best to check with @Arthur-Milchior to see about how to go about this one.
@Arthur-Milchior I added a new JS API method called ankiToggleFullscreen() that lets you cycle through the three fullscreen modes right from your card template. Can you please review it?
@mixelas I'd be fine testing it. But where it is? I see you have two prs that have been closed and I don't know why they are closed
@Arthur-Milchior Sorry for the confusion! Everything is now updated and ready for testing in the new PR above.
Hi @mixelas and @Arthur-Milchior! It looks like this PR has been inactive for a few months. Are you still working on this? If you're too busy, I would love to take this over and help get it over.
@Ratnesh5 I actually already have a PR open for this issue here. It's currently waiting for a maintainer to review it. Thanks for offering to help though!