diff --git a/app/src/main/java/com/philliphsu/clock2/RecyclerViewFragment.java b/app/src/main/java/com/philliphsu/clock2/RecyclerViewFragment.java index e3025ca..b13ae26 100644 --- a/app/src/main/java/com/philliphsu/clock2/RecyclerViewFragment.java +++ b/app/src/main/java/com/philliphsu/clock2/RecyclerViewFragment.java @@ -48,15 +48,11 @@ public abstract class RecyclerViewFragment< /** * @return the adapter to set on the RecyclerView. Called in onCreateView(). - * @param savedInstanceState the same Bundle used to save out and restore state for this Fragment - * when the configuration is changed. Implementors may find this useful - * if their ViewHolder type(s) require saving and restoring state across - * configurations. */ - protected abstract A onCreateAdapter(Bundle savedInstanceState); + protected abstract A onCreateAdapter(); /** - * @return the adapter instance created from {@link #onCreateAdapter(Bundle)} + * @return the adapter instance created from {@link #onCreateAdapter()} */ protected final A getAdapter() { return mAdapter; @@ -76,7 +72,7 @@ public abstract class RecyclerViewFragment< public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = super.onCreateView(inflater, container, savedInstanceState); mList.setLayoutManager(getLayoutManager()); - mList.setAdapter(mAdapter = onCreateAdapter(savedInstanceState)); + mList.setAdapter(mAdapter = onCreateAdapter()); return view; } diff --git a/app/src/main/java/com/philliphsu/clock2/alarms/AlarmsFragment.java b/app/src/main/java/com/philliphsu/clock2/alarms/AlarmsFragment.java index 7f4de49..b8eb5a5 100644 --- a/app/src/main/java/com/philliphsu/clock2/alarms/AlarmsFragment.java +++ b/app/src/main/java/com/philliphsu/clock2/alarms/AlarmsFragment.java @@ -136,7 +136,7 @@ public class AlarmsFragment extends RecyclerViewFragment< } @Override - protected AlarmsCursorAdapter onCreateAdapter(Bundle savedInstanceState) { + protected AlarmsCursorAdapter onCreateAdapter() { // Create a new adapter. This is called before we can initialize mAlarmController, // so right now it is null. However, after super.onCreate() returns, it is initialized, and // the reference variable will be pointing to an actual object. This assignment "propagates" diff --git a/app/src/main/java/com/philliphsu/clock2/stopwatch/StopwatchFragment.java b/app/src/main/java/com/philliphsu/clock2/stopwatch/StopwatchFragment.java index 334ab09..d4e182f 100644 --- a/app/src/main/java/com/philliphsu/clock2/stopwatch/StopwatchFragment.java +++ b/app/src/main/java/com/philliphsu/clock2/stopwatch/StopwatchFragment.java @@ -260,7 +260,7 @@ public class StopwatchFragment extends RecyclerViewFragment< } @Override - protected LapsAdapter onCreateAdapter(Bundle savedInstanceState) { + protected LapsAdapter onCreateAdapter() { return new LapsAdapter(); } diff --git a/app/src/main/java/com/philliphsu/clock2/timers/TimersFragment.java b/app/src/main/java/com/philliphsu/clock2/timers/TimersFragment.java index 6c263f7..f07d104 100644 --- a/app/src/main/java/com/philliphsu/clock2/timers/TimersFragment.java +++ b/app/src/main/java/com/philliphsu/clock2/timers/TimersFragment.java @@ -84,7 +84,7 @@ public class TimersFragment extends RecyclerViewFragment< } @Override - protected TimersCursorAdapter onCreateAdapter(Bundle savedInstanceState) { + protected TimersCursorAdapter onCreateAdapter() { // Create a new adapter. This is called before we can initialize mAsyncTimersTableUpdateHandler, // so right now it is null. However, after super.onCreate() returns, it is initialized, and // the reference variable will be pointing to an actual object. This assignment "propagates"