Stencyl 3.4.0 is now out. Get it now!

Bug Issue: The Navigation Bar area is an out-of-screen zone


Pages: 1 2

Ogiul

  • Subscriber - Stencyl Studio
  • *
September 27, 2015, 01:59:47 pm
Stencyl does not include the Android navigation bar in the screen dimensions.
That means, if in your setting you have ticked “Scale to fit (full screen)”, your app will scale to fit the dimension of screen minus navigation bar; if you compiles with api 19, when the bar disappears the background remains empty. You can fill this under-the-navigation-bar space only with actors (not with backgrounds) but anyway in the navigation area you can not put any interaction, because Stencyl considers this area as an out-of-screen zone.

In my case I calculated the position of many interface elements depending on the screen ratio. On many Android devices, like on Samsung devices, which have no navigation bar by default, I can see my app as perfect working/looking, with everything at the expected position.

The problem is on many other devices like LGs and Nexus:  there, my blue navigation arrows (you can find some pictures attached to my original post here: http://community.stencyl.com/index.php/topic,43939.0/topicseen.html) should be moved down, but I don’t know how I can know whether the device has a navigation bar and what are its dimensions, so I don’t know what kind of attribute (variable) I should use to move my arrows down.  Anyway I can not move the blue arrows down to the navigation-bar area also because this is actually an out-of-screen area where it is impossible any interaction;

Furthermore my game camera move to the center of the screen depending of accelerometer motion and so also the camera position is affected from the unpredictable screen dimensions; as a result, on devices without a navigation bar, everything seems to need to be moved down because stencyl does not calculates the actual center of the screen, but it calculates the center of the screen minus navigation bar instead.

I have tried to compile with api 16 and there my app looks a bit better as the bar is always visible and so users do not expect to use that zone, but I do not think to compile with a such old api is a good solution and neither esthetically it is an optimal solution.
(By the way, I can not understand whether the fixes to the problems reported here http://community.stencyl.com/index.php/topic,41328.0.html were included in the new builds or I really should include them manually every time I am installing a new build…  )

Stencyl, if compiling with api >= 19, should not include the navigation bar in the screen dimensions, as the bar is the most of the time hidden and users expect to be able to interact also on that area.
If the bar is hidden, I need to show my blue arrow, and have them working, in the bar area.

At least we should be able to select in the Stencyl setting a not immersive mode or a different kind of full immersive mode if needed in our games: https://developer.android.com/training/system-ui/immersive.html

These problems were already reported many times long time ago (i.e. http://community.stencyl.com/index.php/topic,39970.msg225136.html#msg225136   
http://community.stencyl.com/index.php/topic,41136.msg231670.html#msg231670    ).

Please fix them, they can potentially create a huge mess in our apps.

Many thanks for you attention and work!
« Last Edit: October 02, 2015, 02:55:51 pm by Ogiul »


Issue updated by captaincomic - September 30, 2015, 05:48:05 pm
  • Tags added: android


Jon

  • Chief Stencyler
  • *
October 02, 2015, 11:14:01 am
Assuming OpenFL hasn't already fixed this, these do a pretty good job providing a solution:

http://stackoverflow.com/questions/24539709/haxe-how-can-i-make-the-android-menu-bar-stay-hidden
https://gist.github.com/Draknek/926ab488b533873970f3
  • Status changed from New to Confirmed
« Last Edit: October 02, 2015, 11:14:52 am by Jon »


oripessach

  • Subscriber - Stencyl Studio
  • *
October 04, 2015, 08:52:57 am
They're related, but what I was seeing was different - the soft keys were clearly visible during gameplay.

Now, to be clear - I don't see this issue with the version of Stencyl I'm using currently. But I had to downgrade at some point to be able to get some work done when 8692.

I just retested with 8692, and the soft keys are visible during game play.

I also tried to test with 8712, and that one's a no-go: It complained about the workspace having the wrong permissions, then promptly forgot my account credentials and asked for them again, and finally failed to find the dialog extension.
« Last Edit: October 04, 2015, 09:11:28 am by oripessach »


Jon

  • Chief Stencyler
  • *
October 04, 2015, 10:48:17 am
The workspace issue is one we're aware of but don't know the cause for. As bad as it looks, it only happens once. It's already being tracked here.
http://community.stencyl.com/index.php?issue=57.0


oripessach

  • Subscriber - Stencyl Studio
  • *
October 05, 2015, 10:53:11 am
The workaround (patching MainActivity.java) does the trick for me. I think you should consider patching the version you include with Stencyl.


Ogiul

  • Subscriber - Stencyl Studio
  • *
October 05, 2015, 01:40:54 pm
Hi, I have not tried the patch yet because I thought Jon's suggestion was aimed to Stencyl developers not to Stencyl users.

Jon or Oripessach , please can you explain me where I can find MainActivity.java and how and where I  have I to modify it?

After this patch, the navigation bar is hidden and it does not appear never, neither when touching the navigation bar area, does it?

What about the possibility to use the lower part of the screen?
1) After the patch, can I use and interact also in the navigation bar area? I mean, can I put i.e. clickable buttons in this area?
2) After the patch, does Stencyl actually consider that area as an actual part of the screen? I mean, the background color will fill the whole screen or only the screen minus the navigation bar area as before?

PS: I am on build 8671 and my subscription is expired while I have been waiting fixes necessary for publishing my work. I would like to have these problems solved before I re-subscribe. Thanks!
« Last Edit: October 05, 2015, 01:52:51 pm by Ogiul »


Jon

  • Chief Stencyler
  • *
October 05, 2015, 09:54:56 pm
The workaround (patching MainActivity.java) does the trick for me. I think you should consider patching the version you include with Stencyl.

Which link did you end up using?


Jon

  • Chief Stencyler
  • *
October 05, 2015, 09:57:09 pm
@Oigul - Look in [STENCYL] ▸ plaf ▸ haxe ▸ lib ▸ lime ▸ lime ▸ legacy ▸ templates ▸ android

That's the file. What you edit it to, oripessach can answer.


Ogiul

  • Subscriber - Stencyl Studio
  • *
October 06, 2015, 05:47:56 am
I used the second link (https://gist.github.com/Draknek/926ab488b533873970f3#file-mainactivity-java) as suggested by oripessach in private message, and I patched the file you (@Jon) told me , but it does not fix the problem I described above, which is not the same of oripessach.

In my case the main problem is that Stencyl does not include the Android navigation bar area in the screen dimensions and it considers the navigation bar area as an "out-of-screen" area; as a result Stencyl does not show any backgrounds and background colors in this area.
It does  only show actors and tiles but they are visible but unusable, that means you can not interact with any actors in this area.

This part of the screen is like a part of the phone cover instead of a working part of the touch screen.
I would need to put buttons to go to the next scene in this area but I can not because they will not work there.

This link  ( https://developer.android.com/training/system-ui/immersive.html ) suggest: "Note: If you like the auto-hiding behavior of IMMERSIVE_STICKY but need to show your own UI controls as well, just use IMMERSIVE combined with Handler.postDelayed() or something similar to re-enter immersive mode after a few seconds."

I am not a programmer, so I can not fully understand if this suggestion can solve Stencyl/my game problem. If it can, @Jon, please explain me what I can do for now and implement the fix in Stencyl.

Please let me know if the problem is clear.
Thanks!




Ogiul

  • Subscriber - Stencyl Studio
  • *
October 06, 2015, 06:51:51 am
This could be useful but I have not the skills to implement these suggestions by myself: https://developer.android.com/training/system-ui/status.html#behind    -   "Make Content Appear Behind the Status Bar"
« Last Edit: October 06, 2015, 07:13:51 am by Ogiul »


Issue updated by Ogiul - October 06, 2015, 07:13:51 am
  • Issue renamed from "Android navigation bar/Scaling to fit/full immersive mode" to "The Navigation Bar area is an out-of-screen zone"


oripessach

  • Subscriber - Stencyl Studio
  • *
October 06, 2015, 07:52:16 am
I replaced MainActivity.java with the version in this link:

https://gist.github.com/Draknek/926ab488b533873970f3#file-mainactivity-java

Note that this version doesn't compile with older Android SDK versions.
« Last Edit: October 06, 2015, 07:53:17 am by oripessach »


Ogiul

  • Subscriber - Stencyl Studio
  • *
October 06, 2015, 08:16:09 am
Thank you  Oripessach, I did the same of you I exported wih Android Target version 19, but it dit not solved the problems I reported. 

@Jon please  read  my first message of today to find a better description of the problems I am spotting.  Do not exhitate to tell me if it is not clear what I mean.


Ogiul

  • Subscriber - Stencyl Studio
  • *
October 21, 2015, 06:15:16 am
Please, do you have any news about this problem?


Jon

  • Chief Stencyler
  • *
October 21, 2015, 11:10:29 am
Robin started looking at this a few days ago and said he'd be in contact with you about a possible solution.


Ogiul

  • Subscriber - Stencyl Studio
  • *
October 21, 2015, 02:09:44 pm
Thank you Jon!


Issue updated by robinschaafsma - October 23, 2015, 12:07:29 pm
  • Status changed from Confirmed to Assigned
  • Issue Assigned from (none) to robinschaafsma


robinschaafsma

  • Master Stencyler
  • *
October 28, 2015, 12:09:20 pm
update:
Recode GameActivity.jave and send it to Ogiul to test is out. No feedback yet.

Also follow this post: http://community.stencyl.com/index.php/topic,44882.0.html
« Last Edit: October 28, 2015, 01:24:39 pm by robinschaafsma »


letmethink

  • Master Stencyler
  • *
October 28, 2015, 01:02:00 pm
Could you attach it here so all can test using it? (I could have a go).


robinschaafsma

  • Master Stencyler
  • *
October 28, 2015, 01:24:57 pm
« Last Edit: October 30, 2015, 12:05:03 pm by robinschaafsma »


Pages: 1 2

Details

  • Reported
    September 27, 2015, 01:59:47 pm
  • Updated
    October 23, 2017, 11:43:28 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    Stencyl 3.3, 3.3.2, Stencyl 3.4, 3.4.0 beta
  • Fixed in
    (none)
  • Assigned to
    robinschaafsma
  • Category
    Game Scaling

Tags