java - Fragment compatibility issues: -
i following tutorial on android website on how have button switch fragment. receiving conflict between android.support.v4.app.fragment
, android.app.fragment
. tried changing fragments on page 1 or other seams both needed process although isn't possible.
to elaborate, first thing has create fragment manager so:
fragmentmanager fragmentmanager = getfragmentmanager();
the problem have down line line of code wants android.support.v4.app.fragment
while default generated 1 on brand new activity android.app.fragment
. tried switching default generated 1 on , gives me different conflict. helpful if show me or link me tutorial present fragment class use.
if you're using import android.support.v4.app.fragment; import android.support.v4.app.fragmentmanager;
must use getsupportfragmentmanager();
instead of getfragmentmanager();
.
source: http://developer.android.com/reference/android/support/v4/app/fragmentactivity.html
Comments
Post a Comment