Fixed non decimal keyboard type for decimal numbers on some devices

This commit is contained in:
Juan Miguel Boyero Corral 2013-03-10 20:06:42 +01:00
parent a623fa21f3
commit 4729f65ba3

View File

@ -293,10 +293,17 @@ public class TestsMake extends Module {
|| answerType.equals("int")
|| answerType.equals("float")) {
if(!answerType.equals("text")) {
textAnswer.setRawInputType(InputType.TYPE_CLASS_NUMBER);
if(answerType.equals("int")) {
textAnswer.setInputType(
InputType.TYPE_CLASS_NUMBER
|InputType.TYPE_NUMBER_FLAG_SIGNED);
} else if(answerType.equals("float")) {
textAnswer.setInputType(
InputType.TYPE_CLASS_NUMBER
|InputType.TYPE_NUMBER_FLAG_DECIMAL
|InputType.TYPE_NUMBER_FLAG_SIGNED);
} else {
textAnswer.setRawInputType(InputType.TYPE_CLASS_TEXT);
textAnswer.setInputType(InputType.TYPE_CLASS_TEXT);
}
a = answers.get(0);