CustomNavigationBarSample icon indicating copy to clipboard operation
CustomNavigationBarSample copied to clipboard

Center alignment is not centered

Open vhugogarcia opened this issue 6 years ago • 6 comments

Hello @rdelrosario ,

I think I found a bug while rendering the text. The alignment is not correct when centering on modal pages with a button on the toolbar.

I'm attaching an screenshot for reference: https://s14.postimg.org/njv2pthgx/Screen_Shot_2018-03-11_at_12.18.53_PM.png

I think it is centering based on the free after toolbar buttons are rendered, however, that makes it look weird aligned as you can see on the screenshot above.

Regards, Victor

vhugogarcia avatar Mar 11 '18 18:03 vhugogarcia

mm that might be fixed when calculating the center position by subtracting the with of the bar button items on iOS.

This is just happening on iOS?

rdelrosario avatar Mar 12 '18 22:03 rdelrosario

This was just happening on iOS, you are right. On Android, I did not test it due Android natively goes to the left position.

vhugogarcia avatar Mar 13 '18 14:03 vhugogarcia

I'm having the same issue on iOS. Hiding the back button using SetHasBackButton doesn't appear to resolve the issue either.

chrismerron avatar Mar 21 '18 10:03 chrismerron

@rdelrosario , I found out that only if there are no toolbar icons or if there is one Icon on the left and the right that the title will be centered.

ali-h2010 avatar Jul 26 '18 05:07 ali-h2010

I did more testing and apparently if the title is too long it will shit to the right for some reason. I think the cause is that, the title is set after the calculation of the center is made.

ali-h2010 avatar Jul 27 '18 17:07 ali-h2010

Hello, custom nav bar is great! Thanks! Is there a solution for this alignment glitch for iOS?

onurhazar avatar Mar 07 '19 08:03 onurhazar