لقد قمت بحل المشكلة هوا الاستبدال public void replaceFragment(Fragment someFragment) { FragmentTransaction transaction = getFragmentManager().beginTransaction(); transaction.replace(R.id.frame_container, someFragment); transaction.addToBackStack(null); transaction.commit(); }
1
شكرا لك على الاهتمام اخي الكريم سوف اقوم باضافة الكلاس كاملا public class Tab3 extends Fragment { @Override private ImageView fashionImg; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // TODO Auto-generated method stub View v = inflater.inflate(R.layout.tab3_layout, container, false); setHasOptionsMenu(true); // return v; } @Override public void onActivityCreated(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onActivityCreated(savedInstanceState); // get the button view fashionImg = (ImageView) getView().findViewById(R.id.imageView7); // set a onclick listener for when the button gets clicked fashionImg.setOnClickListener(new View.OnClickListener()