New issue
Advanced search Search tips

Issue 799398 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Chromebook - View.getMeasuredHeight returns wrong height in fullscreen

Reported by visiolin...@gmail.com, Jan 5 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

Steps to reproduce the problem:
I am getting an incorrect height from View.getMeasuredHeight().

The app uses SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and SYSTEM_UI_FLAG_FULLSCREEN.
The app has a custom view with an OnPreDrawListener to get the dimensions of the custom view.
The custom view is placed in a fragment that is displayed multiple times in a view pager.

When the activity is launched, the view pager instantiates the first two fragments and the PreDrawListeners are fired and the views getMeasuredHeight() is called.
Those two views get an incorrect height measurement that doesn't seem to take the hidden statusbar into account.

When changing tab in the view pager to a fragment that is instantiated lazily, the measured height is correct.

The issue only happens on Chrome OS.

I have attached an example project and APK to reproduce the issue.

1. Open the app.
2. Note the displayed dimensions in Fragment 1.
3. Navigate to Fragment 3.
=> The height in Fragment 3 does not equal the height in Fragment 1.

Device:
Acer Chromebook R14
Version 62.0.3202.43
Platform 9901.35.0
ARC Version 4369606

What is the expected behavior?

What went wrong?
View.getMeasuredHeight returns wrong height in fullscreen

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 63.0.3239.108  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 28.0 r0

The Android tracker says their forum is wrong, so posting here. See: https://issuetracker.google.com/issues/67676669
 
chromebook-view-dimensions-fullscreen (1).zip
1.8 MB Download
app-debug (1).apk
1.8 MB Download
Labels: -OS-Linux OS-Chrome
Components: Platform>ARC
Components: Platform>Apps>ARC

Sign in to add a comment