2013-03-05 51 views
0

我端起我的Android應用到BB 10,有鍵盤過濾問題,如何以編程設置了android:密碼=「true」或假

Numeric keyboard not displaying when porting Android app to BB10

所以作爲getaround我試圖在xml文件中使用password=true,在輸入edittext字段中的值後,我應該從該點開始以編程方式設置password = false

,有沒有辦法實現這一點?

爲你們建議我試圖像下面的代碼還可以,但沒有改變

myNumber = (EditText) findViewById(R.id.myNumber); 
myNumber .setTransformationMethod(PasswordTransformationMethod.getInstance());//this one also 
myNumber .setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);//this two 

但它不會有太大變化,不過濾情況與此兩行代碼也

+0

你在黑莓10中面臨問題嗎?我想只允許橫向模式。你有什麼想法嗎? – 2014-05-31 12:47:41

+0

我已經在我的Manifest文件中設置了方向,但在BB10 Simulator中無法使用。 – 2014-05-31 12:48:30

回答

0

你嘗試這樣的事情

editText.setInputType(InputType.TYPE_CLASS_TEXT); 
2

根據this鏈接:

youredittext.setTransformationMethod(PasswordTransformationMethod.getInstance()); 
相關問題