在Tab布局中列出活动

时间:2011-04-07 09:45:47

标签: android layout frame listactivity

我创建了一个包含三个标签的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); }
      > }

0 个答案:

没有答案