这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@dkramer95
Copy link
Contributor

@dkramer95 dkramer95 commented Jan 28, 2021

FullScreen Mode

Addresses: #507

Just setting full screen flag causes issue w/ ExtraKeysView:

FullScreenWorkAround class was added to help fix issues across various devices so that ExtraKeysView displays properly:

Example of termux.properties config for full screen w/ work-around:
Screen Shot 2021-01-27 at 6 42 02 PM

fullscreen-workaround-method = 1 tested w/ Pixel (Emulator)
fullscreen-workaround-method = 2 tested w/ Samsung S7 and OnePlus 6T
fullscreen-workaround-method = 3 tested w/ Sony Xperia XZ

Some trial and error may be needed for your device.. Another workaround may be needed if the above do not work.

Feedback and testing appreciated!

not displaying properly and inconsistently between various devices
@ghost
Copy link

ghost commented Jan 28, 2021

Just curious: is there a way to have only one workaround suitable for all devices? Having different solutions for different device types selectable from the config is kinda weird.

@dkramer95
Copy link
Contributor Author

Ya between the various devices I tested there was inconsistent behavior in the way usable view space was being calculated with extra keys + status bar. Not sure why that is, so a WIP solution for now, but ideally it would "just work" for all devices w/o needing to specify that.

@ghost
Copy link

ghost commented Jan 28, 2021

@dkramer95 ConnectBot provides a similar widget (extra keys) for its terminal. Not sure if it has same issue as Termux extra keys, but if not, I guess it would be worth to check its implementation.

    * Use WindowInsetsListener to get nav bar height and use that
      instead for calculating adjusted height for extra keys view
@dkramer95
Copy link
Contributor Author

@xeffyr I have found a more reliable method that should eliminate the need for the other custom workarounds.. I found that I needed to use nav bar height and that was what was different between the different devices I had.. Tested new fix on each device and seems to work for all of them!

@ghost ghost self-requested a review January 28, 2021 16:09
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In summary:

  • This can be merged, but I guess "fullscreen workaround" should be always enabled.
  • Further work on this topic is needed.

Confirmed that it works on Samsung Galaxy S7 with workaround enabled. But there are issues:

  • Blank status bar is present until touch keyboard was hidden.
  • Property changes do not take effect on termux-reload-settings.

On Pixel 5 things are even worse. Status bar is just made black without disappearing. See screenshot and notice big black bar on the top. Other apps using fullscreen are working properly.
Screenshot_20210128-182859

@dkramer95
Copy link
Contributor Author

@xeffyr I tested this on a Pixel 4 emulator and was able to replicate.. I tried experimenting w/ various flag combinations but didn't have much success...


Screen Shot 2021-01-28 at 5 59 43 PM


Screen Shot 2021-01-28 at 6 00 18 PM


Closest I was able to get was this, but the content is still obscured by the status bar.. I could never get it to display in this position and have the status bar text go away.. All other attempts, status bar text would be hidden, but it would have that blank margin at the top.
Screen Shot 2021-01-28 at 6 02 00 PM


I'm sure some combo of flags exists to satisfy everything, but haven't found it yet :D.

@ghost ghost merged commit 096dedf into termux:master Feb 1, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant