Skip to content

Conversation

@gujjwal00
Copy link
Contributor

Related Issue: #76

I am assuming that we don't want to remove fullscreen mode. However, if we can afford non-fullscreen mode OR immersive (sticky) mode, we might be able to implement a better solution.

Also, given that this is more of a hack, it would be better to get some user experience.

@bk138
Copy link
Owner

bk138 commented Sep 16, 2020

Me thinks we are using immersive (sticky) mode:

. IIRC, 018c099 was added because I was testing with tablets and the former experience wasn't so nice.

@bk138
Copy link
Owner

bk138 commented Sep 16, 2020

Some thoughts:

  • I like this PR, it definitely is an improvement over the former behaviour.
  • Maybe the screen should also get scaled when the keyboard pops up? But then, how much? To make up for the space taken by the keyboard - can we get that? To fit the screen?
  • This needs testing on tablets. I added 018c099 because tablet experience was suboptimal, let's compare the different approaches on tablets.

@gujjwal00
Copy link
Contributor Author

Me thinks we are using immersive (sticky) mode:

Yes, but we are also setting these flags:

// hide title bar, status bar
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);

These seems to enable more strict fullscreen mode. So far I have found three modes:

  1. Truly fullscreen:

    • Currently in use
    • Specified by LayoutParams.FLAG_FULLSCREEN on window
    • Android ignore any request to auto resize (by adjustResize)
    • We don't get any information about keyboard visibility. (have to watch layout events)
  2. Immersive/Immersive_Sticky

    • Enabled by View.SYSTEM_UI_FLAG_*
    • 'Looks' same as fullscreen
    • It gets disabled if FabMenu is shown or Dialog pops up.
    • adjustResize is still ignored
    • We get 'window insets' when keyboard is visible so we can use that
  3. Non-fullscreen mode

    • adjustResize works

This needs testing on tablets. I added 018c099 because tablet experience was suboptimal, let's compare the different approaches on tablets.

Yeah, there seems to be a lot of edge cases around fullscreen+resize in Android.

@bk138 bk138 added this to the AndroidMultiVNC-2.0.0 milestone Jan 11, 2021
@bk138
Copy link
Owner

bk138 commented Jan 27, 2021

I'll have a tablet at hand soon to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants