How to create Scrollview programmatically?

后端 未结 5 605
一向
一向 2021-02-07 20:01

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 21:05

    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.

提交回复
热议问题