Simple Listview in fragment using SimpleAdapter

后端 未结 3 346
深忆病人
深忆病人 2021-01-20 09:16

Here is my code for fragment extending ListFragment and below are the errors it is showing.Almost Same code is working fine for activity except that in activity i am getting

3条回答
  •  北海茫月
    2021-01-20 10:12

    try this.

    ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.soundcloud, container, false);
    

    and also in your onItemClick

    // Starting single contact activity

    Intent in = new Intent(getActivity().getApplicationContext(),
                       SingleContactActivity.class);
              in.putExtra("name", TAG_TITLE);
              in.putExtra("id", cost);
              startActivity(in);
    

提交回复
热议问题