Please use [ code ] [ /code ] tags (without spaces) when posting code.
I've moved this post to the questions forum.
Your code looks correct though it is enough to only check for Is Label as all other "text" views can be treated as labels.
Gravity sets the text alignment. It doesn't change the text direction.
thank you,
so why doesn't it work?
with or without this code the labels and text fields are aligned the same so it has no effect
sorry for this one but i have a disaster - i can't run the app
when trying to run it i get
jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: AndroidManifest.xml
please help...
Sub ToggleButton1_CheckedChange(Checked As Boolean)
Dim i, G As Int
Dim objType As String
If Checked Then
G = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.RIGHT)
Else
G = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
End If
For i = 0 To Activity.NumberOfViews - 1
objType = GetType(Activity.GetView(i))
Select objType
Case "android.widget.TextView", _
"android.widget.EditText", _
"android.widget.RadioButton", _
"android.widget.CheckBox"
Dim lbl As Label
lbl = Activity.GetView(i)
lbl.Gravity = G
End Select
Next
End Sub
Sub Test1
Dim i As Int
Dim lbl As Label
Dim objType As String
For i = 0 To Activity.NumberOfViews - 1
objType = GetType(Activity.GetView(i))
Log("View " & i & ": " & objType)
Select objType
Case "android.widget.TextView", _
"android.widget.EditText", _
"android.widget.RadioButton", _
"android.widget.CheckBox"
lbl = Activity.GetView(i)
Log(lbl.Text)
End Select
Next
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?