当我按下 plbutton1 时,我没有得到结果。
当我点击 plbutton2 时,活动 R.layout.paraggeleia 打开 corect。
谁能帮我?
我在哪里做错了?这是我的代码!!!!
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Bundle args = getArguments();
switch (args.getInt(ARG_SECTION_NUMBER)){
case 1:
View v = inflater.inflate(R.layout.paraggeleia, container, false);
Button bTutorial = (Button) v.findViewById(R.id.plbutton2);
bTutorial.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
getActivity().startActivity(new Intent (getActivity(), parageleiaproionta.class));
Toast.makeText(v.getContext(), "Loaging Προιόντα", Toast.LENGTH_SHORT).show();
}
});
return v;
case 2:
View m = inflater.inflate(R.layout.paraggeleia, container, false);
Button b1Tutorial = (Button) m.findViewById(R.id.plbutton1);
b1Tutorial.setOnClickListener(new View.OnClickListener(){
public void onClick(View m){
getActivity().startActivity(new Intent (getActivity(), sxetika.class));
Toast.makeText(m.getContext(), "Loaging Προιόντα", Toast.LENGTH_SHORT).show();
}
});
return m;
}
return getView();
}
}