How to create Scrollview programmatically?

后端 未结 5 2221
既然无缘
既然无缘 2021-02-07 20:24

I have one table \"TABLE_SUBJECT\" which contain a number of subjects. I need to create
one horizontal scroll view with Subject.

How do I create a ScrollView with da

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 20:56

    I was doing it like this:

    • Create xml with LinearLayout inside the ScrollView
    • Create xml as item in ScrollView
    • In activity set main content as xml with ScrollView
    • Loop through all table elements with adding new View to LinearLayout form main view

    For me works fine.

提交回复
热议问题