I want to call a class using button created in the fragment. This is the code for the fragment which contains the button.
public class FragmentSecondPage extends Fragment{ View root; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle){ root = inflater.inflate(R.layout.fragment_page2, container, false); return root; } } I want to start a class SplashActivity.class from the button present infragment_page2. Could somebody please help me?