Author Topic: NGUI and Android System Bar  (Read 7688 times)

kaz2057

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
NGUI and Android System Bar
« on: June 13, 2013, 07:49:48 AM »
Dear Aren,

I ask you this problem because I never found a solution.

As you know, usually an Android tablet (also smartphone) is 1280 * 800 ...

BUT! there is inside the screen the cursed :) system bar that use a lot of pixel (on 1280*800 is 64px so height is 736)

Now, rightly NGUI check for Screen.height and the result is 800 instead of 736. This problem hits everytime I use a draggable panel on the bottom anchor from left to right corner that cover the entire width (800px). In this  case the draggable panel is scaled not correctly and everytime I need to setup UIRoot in 736 manually ...

Any solution?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and Android System Bar
« Reply #1 on: June 13, 2013, 02:14:48 PM »
On which Android OS? Both my android devices report the correct height that does not take the system bar into account.

kaz2057

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: NGUI and Android System Bar
« Reply #2 on: June 14, 2013, 04:12:19 AM »
I have a nexus 7.

Try to create a draggable panel from left bottom corner to right bottom corner. it must be long exactly 800 px (set game window size to 1280 x 800).
Set in UIRoot 800 for manual height and build on device.

My panel is a little smallest of the entire width ...
If I set 736 in UIRoot draggable panel is correct ...

If you need I send you photos o screenshot :)

Cheers

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and Android System Bar
« Reply #3 on: June 14, 2013, 05:12:27 PM »
Well, sounds like an issue in your android device's OS reporting the wrong value to Unity, or Unity not taking it into account somehow. There is really nothing I can do about it on NGUI's side. Screen.height returns 800 -- means that's what it is.

kaz2057

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: NGUI and Android System Bar
« Reply #4 on: September 21, 2013, 05:28:09 PM »
Dear Aren,

Because I have however this problem on each my project, can help me to contact unity team or other solution?

On GUI is an error actual android.screen size ....

Thanks for your support
« Last Edit: September 21, 2013, 07:10:54 PM by kaz2057 »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and Android System Bar
« Reply #5 on: September 21, 2013, 09:24:30 PM »
Bug report it to Unity.

kaz2057

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 26
    • View Profile
Re: NGUI and Android System Bar
« Reply #6 on: November 26, 2013, 04:06:24 AM »
Hi Aaren,

have you any news about this issue? :)

Cheers

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI and Android System Bar
« Reply #7 on: November 26, 2013, 04:08:02 AM »
Nope, nothing.