전글에서 답변도 정말 잘 달아주시고
하셧지만..제 두가 우둔하여 ㅡ,.ㅡ 알아먹지 못하네요 이해도 안가고..
그래서 일단 좀더 쉽게 구성을 하여 질문드립니다..ㅠ
public class OceanInfoList extends ListActivity {
List<OceanData> oceandata;
TextView text;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.oceaninfo1);
oceandata = XmlUtil.oceanDataParse(OceanInfoConst.XML_URL + "20091112");
List<OceanData> tmpList = new ArrayList<OceanData>();
String tmpName;
for (OceanData data : oceandata) {
tmpName = data.getName().trim();
if (tmpName != null && tmpName.length() > 0) {
tmpList.add(data);
}
}
String[] arMenu1 = new String[tmpList.size()];
for (int i = 0; i < tmpList.size(); i++) {
arMenu1[i] = tmpList.get(i).getName();
}
Arrays.sort(arMenu1);
TextView text = (TextView)findViewById(R.id.list);
text.setText();
}
}
<?xml version="1.0" encoding="utf-8" ?>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<TextView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
자 초간단하게 에누리 다 짤라버렸어요..Listview 로 잘 나오던 것을 textview로 다시 바꿔서 하려니 컨트롤C,V만 하다보니
이해도 안가고...
xml페이지에 있는 TextView에 어레이로 가져온 값을 화악 뿌려주려면...저 굵게 표시한 것처럼 하는것이 옳은 것인가요?
그리고text.setText();안에 어떤게 들어와야 하나요..() 안에 뭘 넣어도 오류가 나는데.ㅠㅠ
SMS 입니다.



