인텐트를 활용하여 밑에 소스코드에서 당진을 논산을 선택하였을 때 다른 액티비티로 전환하는 방법을 알고 싶습니다.

 

인터넷과 책을 계속 찾아보았는데 워낙 초보인터라.. 도저히 이해가 안되서 질문올립니다..ㅠ

 

 

public class C09_Expandable extends Activity {
 ExpandableListView mList;
 String[] arProv = new String[] {
   "충청도", "경기도", "강원도"
 };
 String[][] arCity = new String[][] {
   {"논산", "당진", "부여"},
   {"수원", "용인"},
   {"춘천", "원주", "홍천", "강릉"},
 };

 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.c09_expandable);

  mList = (ExpandableListView)findViewById(R.id.list);
  List<Map<String, String>> provData = new ArrayList<Map<String, String>>();
  List<List<Map<String, String>>> cityData =
   new ArrayList<List<Map<String, String>>>();
  for (int i = 0; i < arProv.length; i++) {
   Map<String, String> Prov = new HashMap<String, String>();
   Prov.put("prov", arProv[i]);
   provData.add(Prov);

   List<Map<String, String>> children = new ArrayList<Map<String, String>>();
   for (int j = 0; j < arCity[i].length; j++) {
    Map<String, String> City = new HashMap<String, String>();
    City.put("city", arCity[i][j]);
    children.add(City);
   }
   cityData.add(children);
  }

  ExpandableListAdapter adapter = new SimpleExpandableListAdapter(
    this,
    provData,
    android.R.layout.simple_expandable_list_item_1,
    new String[] { "prov" },
    new int[] { android.R.id.text1 },
    cityData,
    android.R.layout.simple_expandable_list_item_1,
    new String[] { "city" },
    new int[] { android.R.id.text1 }
  );
  mList.setAdapter(adapter);
 }
}