Skip to content

Commit

Permalink
Now using Nullable and IdRes support annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
vestrel00 committed Jul 31, 2017
1 parent f127715 commit 88f9f5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -20,6 +20,7 @@
import android.app.Fragment;
import android.app.FragmentManager;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;

import com.vestrel00.daggerbutterknifemvp.navigation.Navigator;
Expand Down Expand Up @@ -63,7 +64,7 @@ public final AndroidInjector<Fragment> fragmentInjector() {
return fragmentInjector;
}

protected final void addFragment(int containerViewId, Fragment fragment) {
protected final void addFragment(@IdRes int containerViewId, Fragment fragment) {
fragmentManager.beginTransaction()
.add(containerViewId, fragment)
.commit();
Expand Down
Expand Up @@ -20,6 +20,8 @@
import android.app.FragmentManager;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.view.View;

import javax.inject.Inject;
Expand Down Expand Up @@ -57,6 +59,7 @@ public abstract class BaseFragment extends Fragment implements HasFragmentInject
@Inject
DispatchingAndroidInjector<Fragment> childFragmentInjector;

@Nullable
private Unbinder viewUnbinder;

@Override
Expand Down Expand Up @@ -103,7 +106,7 @@ public final AndroidInjector<Fragment> fragmentInjector() {
return childFragmentInjector;
}

protected final void addChildFragment(int containerViewId, Fragment fragment) {
protected final void addChildFragment(@IdRes int containerViewId, Fragment fragment) {
childFragmentManager.beginTransaction()
.add(containerViewId, fragment)
.commit();
Expand Down

0 comments on commit 88f9f5b

Please sign in to comment.