mam ten problem ..Metoda add (int, Fragment, String) w typie FragmentTransaction nie dotyczy argumentów (int, fragment String)
The method add(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, Fragment, String)
przy użyciu następującego kodu Wewnątrz FragenmtActivity
getSupportFragmentManager().beginTransaction().add(com.korovyansk.android.slideout.R.id.slideout_placeholder, ((Fragment)new CommentsMenuFragment()), "menu").commit();
gdzie realizacja CommentsMenuFragment jest:
public class CommentsMenuFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_comment, container, false);
ListView lvComments = (ListView) view.findViewById(R.id.lvComments);
return view;
}
}
Czy używasz pliku android.support.v4.app.Fragment lub android.app.Fragment? –
Dzięki, znalazłem odpowiedź na to w następującym pytaniu http://stackoverflow.com/questions/11753921/error-in-fragment – Adham