package org.ntlab.radishforandroidstudio.cactusClient.views; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import org.ntlab.radishforandroidstudio.R; public class StartFragment extends BaseFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_start, container, false); } @Override public void onStart() { super.onStart(); Button button = getActivity().findViewById(R.id.start_button); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { replaceFragment(R.id.fragment_place, new LoginFragment(),false); } }); } }