I want to set the Actionbar title text size. I can do it by defining styles but I am not sure how I can get the whole label and do whatever I want with it.
This is what I am trying to do:
Unfortunately the last JO logs and uninitialized object.
This is what I am trying to do:
B4X:
' To implement
'Int titleId = getResources().getIdentifier("action_bar_title", "id", "android");
'TextView title = (TextView) findViewById(titleId);
'title.setTextSize(20);
Sub GetTitleLabel As Label
Dim JO As JavaObject
jo = GetContext
JO = JO.RunMethod("getResources",Null)
JO = JO.RunMethod("getSystem",Null)
Dim ID As Int
ID = jo.RunMethod("getIdentifier", Array As Object("action_bar_title","id","android"))
Log(ID)
JO = Activity
Log(JO)
JO = JO.RunMethod("findViewById", Array As Object(ID))
Log(JO)
End Sub
Sub GetContext As JavaObject
Return GetBA.GetField("context")
End Sub
Sub GetBA As JavaObject
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetFieldJO("processBA")
End Sub
Unfortunately the last JO logs and uninitialized object.