Author Topic: Wrong draw order panels on specific Android version  (Read 3761 times)

robindelange

  • Guest
Wrong draw order panels on specific Android version
« on: September 25, 2013, 05:25:08 AM »
Okay, we have another problem with our new app. We have a scrollable UI that exists of three draggable panels and one regular panel. This works fine for all our test runs.

Now we have noticed that on Android 4.0.4 the order of the panel is wrong all of a sudden. The draggable panels should show on top and therefore have a z-value of -1. In this version the Other UI Panel with z-value of 0 shows on top however.

Any suggestions? Do different versions of Android render things differently?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Wrong draw order panels on specific Android version
« Reply #1 on: September 25, 2013, 07:42:41 PM »
Use NGUI 3.0. Z has no effect there.

Alternatively, check the Z of your panels. If there is a conflict, such as both using the same Z, then the order in which they appear is undefined.

robindelange

  • Guest
Re: Wrong draw order panels on specific Android version
« Reply #2 on: September 27, 2013, 08:32:58 AM »
We still use 2.6.4, it works, so we didn't update during the development.

The draggable panels have a position.z value of -1, the panel that contains the background has z-value 0.

We're thinking of a button that can pressed to overcome this problem with more drastic measures. Do you perhaps have a suggestion for this?

robindelange

  • Guest
Re: Wrong draw order panels on specific Android version
« Reply #3 on: October 15, 2013, 05:15:49 AM »
The problem wasn't the draw order after all by the way, but rather the 'soft clipping' setting of the panel, which didn't work for some Android devices.