I ran into the problem of formatting a plain text box in Titanium Android.
Problem . I can’t see the entered text box input value. If I print logs, their input will be entered, but will not be visible. On some devices, I get a piece of text.
Below is my code:
In my .js file, I have a text box as follows:
var t1 = Titanium.UI.createTextField({
value : Titanium.App.Properties.getString("userID"),
left : 130,
top : 25,
height : 30,
width : 140,
color : 'black',
font : {
fontSize : 12
},
borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
});
In my tiapp.xml file:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application android:theme="@style/Theme.Titanium"/>
<supports-screens android:anyDensity="false"
android:largeScreens="false"
android:normalScreens="false" android:resizeable="false"
android:smallScreens="false" android:xlargeScreens="false"/>
</manifest>
</android>
The solution has been verified . I tried the solution indicated in the link:
, TextField " Ti.UI.SIZE" + <supports-screens android:anyDensity="true"/> tiapp.xml + <property name="ti.ui.defaultunit">dp</property> tiapp.xml.
"Ti.UI.SIZE", , , , .
.
.
: Android 4.4.4 5.0 OS. .