ricardoalcocer / actionbarextras

Titanium Android Native Module that exposes ActionBar features not exposed by the Titanium SDK
MIT License
148 stars 60 forks source link

Delay after setting actionbarextras properties #91

Closed grazianogrespan closed 9 years ago

grazianogrespan commented 9 years ago

Hi! Don't know if it is a module issue or my module implementation that creates this glitch. Every time, just after the app starts, there is little delay in which the actionBar applies my configurations. I have set a red background color inside the window's "open" event . At first, the action bar is black, then background color changes to red only half second later. Both emulator and device reproduce this effect.

manumaticx commented 9 years ago

Hi @grazianogrespan

yes this is how it works, you're not doing anything wrong. The reason for the delay is the timing until the open event gets fired on the window. This is a Titanium limitation since you cannot access the activity of a window before the open event got fired.

If you are just using this for changing the actionbars background color, you should workaround this by using themes to style your actionbar. If you need to change it at runtime, then you could use this module.

grazianogrespan commented 9 years ago

Thanks @manumaticx for your reply ! I have to use this module cause i make changes to actionbar at runtime. Every window of my app has a different actionbar title,bg-color etc. Anyway thank you very much for the explanation!

manumaticx commented 9 years ago

You can use themes for this anyway. Am 16.10.2015 6:20 nachm. schrieb "Graziano" notifications@github.com:

Thanks @manumaticx https://github.com/manumaticx for your reply ! I have to use this module cause i make changes to actionbar at runtime. Every window of my app has a different actionbar title,bg-color etc. Anyway thank you very much for the explanation!

— Reply to this email directly or view it on GitHub https://github.com/ricardoalcocer/actionbarextras/issues/91#issuecomment-148759156 .

manumaticx commented 9 years ago

You can set window.title and window.theme before opening it. This will solve the delay issue. Use abx to change the background color after the window was opened.

manumaticx commented 9 years ago

Can we close this?

grazianogrespan commented 9 years ago

Yes @manumaticx , thank you again! ;)

manumaticx commented 9 years ago

:v: