1
在我的代碼,上線transaction.setCustomAnimations()
下,IDE顯示:FragmentTransaction的setCustomAnimation()給錯誤
Expected Resource of Type Animator
這裏是我的代碼:
import android.app.Fragment;
import android.app.FragmentTransaction;
private void loadPasswordFragment() {
FragmentTransaction transaction = getFragmentManager().beginTransaction();
Fragment mFragment = new ForgotWithPasswordFrag();
transaction.setCustomAnimations(R.anim.fade_out, R.anim.fade_in);
transaction.replace(R.id.container, mFragment);
transaction.addToBackStack(null);
transaction.commit();
}
那裏你:) – KDeogharkar
如果它的工作,將其標記爲答案。 – Sufian