http://bbs.51cto.com/thread-1091458-1-1.html
有详解
@Override
public void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);// 为了在Fragment中显示右上角的menu
}
其他的设置和activity没区别
原文:http://www.cnblogs.com/jeno-song/p/5103497.html