I am making an app for studies with tabbedActivity plus the button is not taking the action, someone knows to explain the reason, I have tried several forms but all are without action, does not give error and breaks the app but the button nothing
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
rooView = inflater.inflate(R.layout.fragment_teste, container, false);
final Context context = getContext();
button = (Button) rooView.findViewById(R.id.button);
button.setOnClickListener((View.OnClickListener) this);
return rooView;
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.button:
Toast.makeText(getContext(), "Teste", Toast.LENGTH_LONG).show();
break;
}
}