전화번호를 리스트뷰로 만들었는데요

전화번호가 너무 많아서 카테고리별로 나누려고 합니다.

4개 정도의 카테고리로 나누려 하는데요

첨부한 그림과 같이 처음에는 카테고리만 나오다가

해당 카테고리를 누르면 그에 해당하는 리스트가 밑에 나오고

다시 해당 카테고리를 누르면 리스트가 사라지게 만들고 싶은데요

어떻게 구현 하면 좋을까요?-_ㅠ

카테고리를 리스트로만들어서 가능할까요? 아님 버튼으로 해야하나요?

if 문으로 구현할수 밖에 없나요?

레이아웃은 어떻게 만들어 줘야 할까요?-_ㅠ

누를때마다 모양이 바뀌게 하려고 하는데요 그건 배경이미지를 바꿔주려고 생각중입니다.)


xml 소스입니다.
  <?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
  <ListView android:id="@+id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent" />
  <TextView android:id="@+id/android:empty" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="tets" />
  </LinearLayout>


java소스 입니다.


public class tabHost3_1 extends ListActivity {
    private ArrayList<String> list;
    private ArrayAdapter<String> adapter;
   
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.number);
        list = new ArrayList<String>();
        list.add("까페1");
        list.add("까페2");
        list.add("식당1");
        list.add("식당2");
        list.add("식당3");
        list.add("헬스장1");
        list.add("헬스장2");
        ................
      
        setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, list));
        getListView().setTextFilterEnabled(true);
       
    }
    //private static final ArrayList<String> GENRES = new ArrayList<String> ();
         
    @Override
    protected void onListItemClick (ListView l, View v, int position, long id){
        super.onListItemClick(l, v, position, id);
        //Toast.makeText(this, list.get(position), Toast.LENGTH_SHORT).show();
        switch(position)
        {
        case 0:
         String temp1 = "010234829324";
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + temp1))); 
         } catch (Exception e) {
          e.printStackTrace();
         }break;
        case 1:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "324324324"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
        case 2:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "324234324"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
        case 3:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "546546456"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
        case 4:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "3242346564"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
        case 5:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "0328359570"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
        case 6:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "435435345345"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
        case 7:
         try {
          startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + "435345345"))); 
         } catch (Exception e) { e.printStackTrace();}
         break;
       }
      .......................
    }
}