I have fragmentActivity class which implements OnTabChangeListener and acts as a host for other fragment classes. Every fragment classes is defined in different XML layout files for their own Layout.
I want to get the View from that fragment class inside the fragmentActivity class.
I have tried :
View view = myFragment.getView();
Button myButton = (Button) view.findViewById(R.id.my_button);
myButton.setOnClickListener(new MyClickListener());
But doesn't seem to work.
So does anyone know?