Android Question label that could be scrolled ?

Devv

Active Member
Licensed User
Longtime User
I'am trying to make a lable that could be scrolled by the user

B4X:
Sub Globals
    Private Label1 As Label
    Private ScrollView1 As ScrollView
    Dim sting As String
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("scroll")
    ScrollView1.Panel.LoadLayout("label")
   
    For i = 0 To 100
        sting = sting & i & CRLF
    Next
    Label1.Text = sting
End Sub

i found a post somewhere a post that say make two activities one have a scrollview and the other is a label then set the layout of the scrollview to be the label itself.
i had no luck making that (i found a working project, but i cant do it myself with a new project), any ideas ?

i attached my project
 

Attachments

  • label.zip
    7.6 KB · Views: 93

luciano deri

Active Member
Licensed User
Longtime User
I'am trying to make a lable that could be scrolled by the user

B4X:
Sub Globals
    Private Label1 As Label
    Private ScrollView1 As ScrollView
    Dim sting As String
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("scroll")
    ScrollView1.Panel.LoadLayout("label")
  
    For i = 0 To 100
        sting = sting & i & CRLF
    Next
    Label1.Text = sting
End Sub

i found a post somewhere a post that say make two activities one have a scrollview and the other is a label then set the layout of the scrollview to be the label itself.
i had no luck making that (i found a working project, but i cant do it myself with a new project), any ideas ?

i attached my project

See This
https://www.b4x.com/android/forum/t...for-showing-a-large-text-file.7164/#post62038
 
Upvote 0
Top