iOS Question Tableview font size

josnav

Member
Licensed User
Longtime User
Hi!
How can I change the font size of the first line added in a table view using "TableView1.AddTwoLines"?

Thanks
Jose
 

jazzzzzzz

Active Member
Licensed User
Longtime User
I want to change font of both twolines,how will i do it?

B4X:
Dim tc As TableCell = TableView1.AddTwoLines("","")
                    Dim att As AttributedString
                    att.Initialize(t2, Font.CreateNew2("Avenir-Medium", 12), Colors.Black)
                    tc.DetailText = att
                   
                    att.Initialize(t1, Font.CreateNew2("Avenir-Medium", 15), Colors.Black)
                    tc.Text = att
I tried this but not correct
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Works fine here.

This is the complete code:
B4X:
Private Sub Application_Start ( Nav As NavigationController)
   NavControl = Nav
   Page1.Initialize("Page1")
   Page1.Title = "Page 1"
   Page1.RootPanel.LoadLayout("1")
   Nav.ShowPage(Page1)
   Dim tc As TableCell = TableView1.AddTwoLines("","")
  Dim att As AttributedString
  att.Initialize("asdasdasd", Font.CreateNew2("Avenir-Medium", 22), Colors.Black)
  tc.DetailText = att
  att.Initialize("asdasdasd", Font.CreateNew2("Avenir-Medium", 25), Colors.Black)
  tc.Text = att
End Sub
 
Upvote 0

jazzzzzzz

Active Member
Licensed User
Longtime User
Works fine here.

This is the complete code:
B4X:
Private Sub Application_Start ( Nav As NavigationController)
   NavControl = Nav
   Page1.Initialize("Page1")
   Page1.Title = "Page 1"
   Page1.RootPanel.LoadLayout("1")
   Nav.ShowPage(Page1)
   Dim tc As TableCell = TableView1.AddTwoLines("","")
  Dim att As AttributedString
  att.Initialize("asdasdasd", Font.CreateNew2("Avenir-Medium", 22), Colors.Black)
  tc.DetailText = att
  att.Initialize("asdasdasd", Font.CreateNew2("Avenir-Medium", 25), Colors.Black)
  tc.Text = att
End Sub

please give different data in "text" and "detailtext" and check
 
Upvote 0

jazzzzzzz

Active Member
Licensed User
Longtime User
B4X:
Dim tc As TableCell = TableView1.AddTwoLines("","")
                    Dim att As AttributedString
                    att.Initialize("asdasdasd", Font.CreateNew2("Avenir-Medium", 15), Colors.Black)
                    tc.DetailText = att
                    att.Initialize("kkkkkkkk", Font.CreateNew2("Avenir-Medium", 9), Colors.Black)

here only kkk is displayed asdasdasd is not at all displayed in tableview for me
 
Upvote 0
Top