Whenever we use *Ti.UI.TEXT_ALIGNMENT_CENTER* on TextField in Android, it flickers & switches to default *keyboardType* after pressing device's back-button & sometimes after pressing the Return key also.
I tried it by using different *inputType* & *keyboardType* combination also, but after pressing device's back-button, it's showing up the default *keyboardType* for a millisecond & then it hides down.
This behaviour is further causing irregularities in TextField's *focus()* method.
I tested it on both 7.0.0.GA & 7.0.1.GA SDK, it behaves same. At present, I can't seem to find any temporary solution if I use *Ti.UI.TEXT_ALIGNMENT_CENTER* alignment.
Here's the sample code & also a video of a different app but with same issue.
var win = Ti.UI.createWindow({
backgroundColor: 'white',
title : 'Ti Samples'
});
var field = Ti.UI.createTextField({
top : 50,
inputType : [Ti.UI.INPUT_TYPE_CLASS_NUMBER],
width : '70%',
color : 'black',
hintText : '1234...',
hintTextColor : '#555555',
textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER
});
win.add(field);
win.open();
Hello, I have tested your sample code on both Android 7.x emulator and device. I wasn't able to reproduce the issue with SDK 7.0.0.GA. I don't see any flickering or keyboard input type change when I press back. I don't have the Redmi Note 3 and Moto G4 Play device. I looked for the emulators, unfortunately, Genymotion does not provide those either. [~jquick], anyone has those devices?
Sharif , can you please look at the environment I have specified in this bug. I tested it on 6 different devices of various companies & with different Android version, so I hope you can get the idea that only Android OS 6.0.1 is causing this issue (at least this is what I found out in my testing)? I request you to please test it on Android OS 6.x Joshua , I have added a video of this bug for clear information about the issue. On both those 2 devices with OS 6.0.1, even I created & tested a native Android app with an EditText with same center-alignment, but it didn't cause any issue then. So, it's sure Titanium SDK is the issue here.
Hello [~prashant_saini], please test the issue with SDK 6.1.x on your Redmi Note 3 and Moto G4 Play device running OS 6.0.1, And let us know the result. Thanks.
Hi Sharif, I don't have any other SDK than 7.0.0, 7.0.1 & 5.5.1. But I really don't understand why you guys are asking me to test this when I have provided you a video attachment with 6 different devices. Does it not matter to you that it's happening on Ti SDK 7.0.1 & still you want it checked on older SDKs? Please understand that I am not a tester so I do not keep every SDK in my machine. Somehow I managed those 6 devices from my colleagues, but I simply don't have any SDK of 6.x version.
Hello [~prashant_saini], First, as I said I don't have the Redmi Note 3 and Moto G4 Play device, If I had, I would have already tested there with SDK 6.x SDK. Now the reason we are asking for you to test with SDK 6.x on the mentioned devices is, we want to identify where the issue originated. This will help us identify the issue and we can move for a fix. You can easily download any previous version of SDK form the studio. Thanks.
Hello Sharif, I am quite busy to test it on different SDKs, but I guess you missed few points which are: - It's happening only on Android 6.x OS - On Android 6.x OS, it's not happening with native application, it's happening only with Titanium app. So, can you guys try it on any Android 6.x device (it gives you range to chose any android device, not just the mentioned ones)?
Hello, I can't reproduce this issue with Android 6.0 emulator in SDK 7.0.2.GA. I don't observe the flickering of keyboard change when I press the back button.