Title is not properly centered on Android 4.4

This happens with the following code:

	<ion-modal-view>
		<ion-header-bar>
			<button class="button button-clear button-primary" ng-click="wallEntries.cancel()">Cancel</button>
  				<h1 class="title">New Comment</h1>
			<button class="button button-clear button-positive" ng-click="wallEntries.submit()">Post</button>
		</ion-header-bar>

The result on Android 4.4 is the following:

While on a regular web browser it centers properly:

What version of ionic are you using?

I’m using the nightly build 1.0.0-beta.13-nightly-863, from 12/7/2014
The android test environment is 4.4.2 x86.

Hm, just tried this with nightly-866 and it seems to be good on a nexus 5.

Strange - might my my version of Android/Chrome. I’ll try to upgrade to 4.4.4 and see if it is better.
Thanks for looking at it anyway!

Let me know if the issue is still around.

This fix may help to update the title’s alignment: https://github.com/driftyco/ionic/commit/e53581b8052ec6a4b41d7760681a8d78aaf32a64

Thanks Adam - that did the trick. I moved to the latest nightly and now it centers fine.

This issue remains for me on Android 4.4 (Note 4) using beta14

… and with a little more reading and research I see that this is by design:

“How to align the title. By default the title will be aligned the same as how the platform aligns its titles (iOS centers titles, Android aligns them left). Available: ‘left’, ‘right’, or ‘center’. Defaults to the same as the platform.”

1 Like