When you click on the button that is on the fragment, the click is not processed.
public class LoginFragment extends android.app.Fragment implements View.OnClickListener { public LoginFragment() { // Required empty public constructor } Button button; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_login, null); button = (Button) v.findViewById(R.id.btnLogin); button.setOnClickListener(this); // ΠΏΡΠΈΡΠ²ΠΎΠ΅Π½ΠΈΠ΅ ΠΊΠ½ΠΎΠΏΠΊΠΈ Π»ΠΈΡΡΠ΅Π½Π΅ΡΡ return inflater.inflate(R.layout.fragment_login, container, false); } @Override public void onClick(View v) { Toast.makeText(getActivity(),"2134",Toast.LENGTH_LONG).show(); } } The issue resolved the problem was in this line
View v = inflater.inflate(R.layout.fragment_login, container, false);