I found an issue on TextField with property
editable = "false"
Notice that, i work on Titanium Studio and the issue concern only Android Platform.
Consider a simple window with 2 textfield, the first one have editable property set to false, the second is editable.
Now, run the app, try to enter the first textfield => you can't because is not editable, so is expected behaviour.
Next enter into the second textField which is editable, the soft keyboard get opened and you can enter some text.
Now, don't close the soft keyboard, and tap on the first textfield (the soft keyboard is still opened), you can now enter some text into the first TextField which is normally not editable !
So, somebody have an idea to solve this behaviour ?
Orating System
Name = Mac OS X
Version = 10.11.3
Architecture = 64bit
# CPUs = 4
Memory = 17179869184
Node.js
Node.js Version = 0.12.7
npm Version = 2.11.3
Titanium CLI
CLI Version = 5.0.6
Titanium SDK
SDK Version = 5.2.0.GA
SDK Path = /Users/Me/#/mobilesdk/osx/5.2.0.GA
Target Platform = android
Related
i've to work with phonegap build, cli 5.x and try to build a search form with several inputs, 3 of them are select boxes.
all works fine till i wanted to set the css of the select nodes to 100% with. If i enable this css the selection does not open any more.
My Android Device for testing that won't work is a Nexus 7 with Android 5.1.1 (Lollipop). On IOS and Android Devices with 4.x all is working fine.
The language we use is Typescript with JQuery and will be compiled to Javascript ES5 (commonJS Style).
Sample Script:
var sampleData = [{"val": 1, "text": "sample A"}, {"val": 2, "text": "sample B"}];
var myContainer $('#content-box');
var selectBox = $('<select>').attr('id', 'mySelectBox');
selectBox.append($('<option>').attr('value', 'none').html('-- none --'));
for(var index in sampleData) {
var obj = sampleData[index];
selectBox.append($('<option>').attr('value', obj['val']).html(obj['text']));
}
// code above works fine
$('select').css('width', '100%');
// this crashes the popup after compilation
// and i have to use phonegap-build
by the way, if i have extreme long content going over 100% of the screen with it works. just stretching seems to crash.
i don't work with jquery mobile, some features we build won't work with it !!!
tried external css also, same failure.
somebody has a workaround or a fix for it? somebody can confirm this solution?
Try setting an id for the element you want to modify,
then try
$('#select').css('width', '100%');
if id="select"
I developed a simple javafx application to be ported in Android Environment, however I cant type any characters in the TextField. I guess its a bug, how to fix this one?
Th problem on galaxy S5 android 5.0.1 is not present but on galaxy tab 4 android 5.0.2 it doesn't work i type but none is displyed.
Tried with normal textfield. And the problem persist also I have added the properties .
Another strange rhig is that the space where recognizer. And the del button . The text not
THe code by example is very easy
Rectangle2D visualBounds = Screen.getPrimary().getVisualBounds();
double width = visualBounds.getWidth();
double height = visualBounds.getHeight();
TextField tt= new TextField();
tt.setTranslateY(-150);
StackPane stackPane = new StackPane();
stackPane.getChildren().addAll(tt);
borderpane.setCenter(stackPane);
Scene scene = new Scene(borderpane, width, height);
stage.setScene(scene);
Assuming that CustomTextField is just a custom TextField, this is a known issue, not related to the CustomTextField itself, given that it works in other device.
If you debug it:
./adb logcat -v threadtime
you surely find an exception that explains the issue: a StackOverFlow exception.
On older devices it can be solved adding this: create a java.custom.properties file, and include in it this property:
monocle.stackSize=128000
You may also include this one:
monocle.platform=Android
(it will be soon included by default in the next version)
Put the file at the root of your classpath, e.g. in the folder src/android/resources of your project.
Build and deploy the project on your mobile and check again.
I am using AndroidViewClient for testing my android application. I need to access name of current focused window. How can I get it?
It's a bit tricky but can be done. The information about the windows and focus is internally maintained by the Views under some conditions.
You may try something like this (choose any view you have):
...
vc = ViewClient(device, serialno, **kwargs2)
vc.dump(window='-1')
no_id1 = vc.findViewByIdOrRaise("id/no_id/1")
no_id1.useUiAutomator = False # this forces getting windows info
no_id1.getXY() # this gets windows info
print no_id1.windows[no_id1.currentFocus]
Before upgrading my nexus 4 from Android 4.3 to 4.4(Kitkat) i could erase whith the BackSpace button a default text that i was casting on load in a TextInput. Strangely, now i cannot delete the text of this TextInput while using the default keyboard (the Google keyboard), but works perfectly with other keyboards that are available on Google Play. I don't know if it is an OS issue or my code needs modification or an upgrade to Kivy might be required.
my code looks as follows (in kv):
TextInput:
id:txt_from_mail
font_size: root.height * .044
size_hint: (None,None)
size: root.width*.65,root.height*.0833
background_color:(1,2,0.7,0.9)
foreground_color: (.2,.4,.5,.9)
padding_y:self.height*.12
text:"YourGmail#gmail.com" # this is the text that i cannot delete or modify
multiline:False
on_focus:root.clear_mail_feedback()
and in Python the function looks like that:
def clear_mail_feedback(self):
self.the_mail_feedback.text="" # this is a label in my form that gives text feedback to users
EDIT : i can also add other findings. typing text in the TextInput, put the application in the background, call back the application, and try to edit your text, you cannot! could it be an issue with latinIME? with native coding??? clueless...
This is a known issue with kitkat, kivy. There is a temp hack/fix here
I have an address search field in my app. When this field gets focus I want to open the keyboard as in the following image.
It works fine for iOS when the keyboard type is set to Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION as in the following code
var search = Titanium.UI.createSearchBar({
barColor:'#c8c8c8',
autocorrect:true,
hintText:'enter address',
height:'43dp',
top:'75dp',
autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_WORDS,
keyboardType:Titanium.UI.KEYBOARD_NUMBERS_PUNCTUATION
});
However on Android it appears as in the following image.
I am using Titanium mobile SDK 1.7.5
You should probably add :
softKeyboardOnFocus : Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS
Unfortunately, it may be overridden by the system. Try it on another Android system (3.0 for example) if the problem persist.