我正在使用片段。我在片段中有一个微调器。我想在选择微调器项目时启动一个新活动。我收到此错误
错误
构造函数 Intent(UserHomeActivity, Class) 未定义 UserHomeActivity.java /SwipeyTabs/src/com/recscores/android 第 28 行 Java 问题
public class UserHomeActivity extends SherlockFragment{
Spinner spinnerTeam;
Spinner spinnerLeague;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
View view =inflater.inflate(R.layout.user_home, container, false);
// Team Spinner
spinnerTeam = (Spinner)view.findViewById(R.id.spinner_team);
spinnerTeam.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
**Intent ii = new Intent(UserHomeActivity.this,TeamHomeActivity.class);
startActivity(ii); **
}
public void onNothingSelected(AdapterView<?> adapterView) {
return;
}
});