01.
@Override
02.
public
View onCreateView(LayoutInflater inflater,
@Nullable
ViewGroup container,
@Nullable
Bundle savedInstanceState) {
03.
04.
View rootView = inflater.inflate(R.layout.layout_menu, container,
false
);
05.
06.
07.
Button button = (Button) rootView.findViewById(R.id.imageButtonAll);
08.
button.setOnClickListener(
this
);
09.
10.
11.
return
rootView;
12.
13.
14.
15.
16.
}
17.
18.
@Override
19.
public
void
onClick(View v) {
20.
HomeFragment homeFragment =
new
HomeFragment();
21.
FragmentTransaction transaction = getFragmentManager().beginTransaction();
22.
transaction.replace(R.id.frame_container, homeFragment);
23.
transaction.commit();
24.
25.
}