我怎么ActionBarActivity
能从Class
那个中extends
得到Fragment
。
这是我的课:
public class Email_Fragment extends Fragment{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBarActivity activity ;
activity = this;
}
public Email_Fragment()
{
super();
}
@Override
public void onAttach(Activity activity)
{
super.onAttach(activity);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
View rootView = inflater.inflate(R.layout.email_fragment, container, false);
return rootView;
}
}
我需要这个:
ActionBarActivity activity ;
activity = this;
我需要使用clicklistener
.
注意:我正在使用 fromimport android.support.v7.app.ActionBarActivity;