0
나는 android에 문자열이 있습니다.android에서 목록보기로 데이터를 분할하고 설정하는 방법은 무엇입니까?
str = |test1:23|st1:4|st2:3|st3:5|test2:25|st1:5|st2:6|st3:7|test3:26|st1:5|st2:2|st3:8|test4:28|st1:8|st2:3|st3:2|test5:29|st1:1|st2:2|st3:2|......
I need to split that string and set each data to listview in android.
I mean for each listitem I should keep the data as
test1:23
st1:4
st2:3
st3:5
---------------------
test2:25
st1:5
st2:6
st3:7
----------------------
이제 문자열을 | 사용 기호 :
String splitstring = str.split("\\|");
지금 splitstring[0]
가 test1:23
을 포함
splitstring[1]
이
sty:4
이 포함되어 있습니다. 하지만 처음 4 ~ 1 번째 listitem, 다음 4 ~ 4 번째 listitem 등을 설정해야합니다. 어떻게 그 작업을 수행 할 수 있습니까? 미리 감사드립니다.