|
@@ -1815,19 +1815,28 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
*/
|
|
|
private void pushRecordOverviewForFilter(LogFilter filter, String groupingKey){
|
|
|
|
|
|
+ // Get the FragmentManager from the MainActivity.
|
|
|
+ // The FragmentManager handles every pushing / popping action of a Fragment.
|
|
|
FragmentManager fm = this.getActivity().getFragmentManager();
|
|
|
|
|
|
if (fm != null){
|
|
|
+ // Create a new instance of your Fragment.
|
|
|
RecordOverviewFragment newFragment = new RecordOverviewFragment();
|
|
|
+ // Set true, if the user can navigate backwards from the new pushed fragment.
|
|
|
newFragment.setUpNavigatible(true);
|
|
|
- newFragment.setFilter(filter);
|
|
|
|
|
|
+ // Set a Filter Object if needed.
|
|
|
+ // Otherwise the RecordOverviewFragment will display all possible records / attacks.
|
|
|
+ // With the filter object you also can change the sorting, by changing the sorttype of it.
|
|
|
+ if (filter != null) newFragment.setFilter(filter);
|
|
|
+
|
|
|
+ // Set a grouping key, if you want a other grouping behaviour than the default (timestamp).
|
|
|
if (groupingKey != null && groupingKey.length() != 0) newFragment.setGroupKey(groupingKey);
|
|
|
|
|
|
+ // Push new Fragment
|
|
|
MainActivity.getInstance().injectFragment(newFragment);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|