multiple spinner but one in xml

匆匆过客 提交于 2020-01-25 03:00:37

问题


Hi please look at my xml file, very straight and simple, one textView and one Spinner

                <TextView android:id="@+id/TextViewContactNamesTexting"
                android:layout_height="wrap_content" android:layout_gravity="center_vertical"
                android:text="name" android:layout_width="fill_parent"
                android:textColor="@color/font" android:textSize="15sp"></TextView>

            <Spinner android:layout_height="wrap_content"
                android:layout_width="fill_parent" android:layout_marginLeft="10px"
                android:id="@+id/SpinnerNumTexting"></Spinner>

in run time I would like to generate as many as I want depending on an arrayList. I attach the picture which explains my thought better. any suggestion? I know how to fill the spinner appropriately, just stuck on generating more than one :(

thanks in advance...


回答1:


Use a ListView, with a SimpleAdapter. A quick Google search will turn up a number of tutorials on using a SimpleAdapter.



来源:https://stackoverflow.com/questions/4687124/multiple-spinner-but-one-in-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!