Android Question Reflection Library - TabHost Tabs Settings

raezenkane

Member
Licensed User
Longtime User
I am using the Reflection Library to alter settings in the TabHost Tabs, specifically, Tab Widths, Heights, and some other stuff. But I am trying to do this:
B4X:
TextView tv =  (TextView) mTabHost.getTabWidget().getChildAt(index).findViewById(android.R.id.title);
   tv.setAllCaps(False)
...with this...
B4X:
'TextView tv =  (TextView) mTabHost.getTabWidget().getChildAt(index).findViewById(android.R.id.title);
  'tv.setAllCaps(False)
Sub SetTabsCaps(TabHost1 As TabHost)
    Dim Reflector1 As Reflector
    Dim TabIndex, TabCount As Int
    Dim TabWidget As Object
    Dim TabTitle As Object
    Reflector1.Target=TabHost1
    TabWidget=Reflector1.RunMethod("getTabWidget")
    Reflector1.Target=TabWidget
    TabCount=Reflector1.RunMethod("getTabCount")
    Dim TabIndicator As View
    Dim intTitle As Int: intTitle=16908310
    For TabIndex=0 To TabCount-1
        TabIndicator=Reflector1.RunMethod2("getChildAt", TabIndex, "java.lang.int")
        Reflector1.Target=TabIndicator
        TabTitle=Reflector1.RunMethod2("findViewById", intTitle, "java.lang.int")
        Reflector1.RunMethod2("setAllCaps", False, "java.lang.int")
    Next
End Sub
...but it throws this error:
java.lang.NumberFormatException: Invalid int: "1.690831E7"

Can someone tell me what I am doing wrong, and maybe even show me how to do it right, if possible?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…