我得到的错误:ERROR here: can't connect to Play.cass
我做错了什么?
public class AppleFragment extends Fragment implements OnItemClickListener,
SensorEventListener {
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
Log.i("list", "choose:" + musicList.get(arg2) + "this");
Intent intent = new Intent();
intent.setClass(getActivity(), Play.class);
intent.putExtra("song", musicList.get(arg2));
startActivity(intent);
}
}
答案 0 :(得分:1)
Intent intent = new Intent(getActivity(), Play.class);
intent.putExtra("song", musicList.get(arg2));
getActivity().startActivity(intent);