我正在尝试从另一个包中的父活动调用Fragment和OnClick方法。
onClick方法的代码是:
public static void Back(View v) {
mPager.setCurrentItem(mPager.getCurrentItem() - 1, true);
}
public static void Next(View v) {
mPager.setCurrentItem(mPager.getCurrentItem() + 1, true);
}
这里是Fragment的代码,我想从
中调用这些方法public class Level1Question1 extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// TODO Auto-generated method stub
View rootView = inflater.inflate(R.layout.fragment_a, container, false);
Button buttonQuestion = (Button) rootView.findViewById(R.id.buttonQuestion);
What do I do here?
return rootView;