I'm trying to use Intent inside PlaceholderFragment class of TabActivity's fragment to open next Activity.
Here is my code:
PlaceHolderFragment class
public ImageButton Next;
public View onCreateView(
@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
View rootView=inflater.inflate(R.layout.fragment_main_tab,container,true);
Next=(ImageButton)rootView.findViewById(R.id.btn_expand);
Next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
updatedetails();
}
});
View root=null;
switch (getArguments().getInt(ARG_SECTION_NUMBER))
{
case 1:
root = inflater.inflate(R.layout.fragment_main_tab, container, false);
break;
case 2:
root = inflater.inflate(R.layout.fragment_team_screen_, container, false);
break;
}
return root;
}
public void updatedetails(){
Intent intent = new Intent(getActivity(), Enquiry_followup.class);
startActivity(intent);
}