我创建了一个包含三个标签的tab layout
,现在我想要一个行代码,这些代码可以让我使用标签在frame layout
中打开列表,
package com.NVT.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
public class FurtherEducationCourses extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent myIntent = new Intent(view.getContext(), Courses.class);
startActivityForResult(myIntent, 0);
}
}
在Intent myIntent = new Intent(view.getContext(), Courses.class);
上收到错误
错误是
> ... import android.os.Bundle; import
> android.view.View; import
> android.widget.TextView; ... View
> view; Intent myIntent = new
> Intent(view.getContext(),
> Courses.class);
> startActivityForResult(myIntent, 0); }
> }