|
@@ -170,7 +170,6 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
if (this.filter == null){
|
|
if (this.filter == null){
|
|
Intent intent = this.getActivity().getIntent();
|
|
Intent intent = this.getActivity().getIntent();
|
|
LogFilter filter = intent.getParcelableExtra(LogFilter.LOG_FILTER_INTENT_KEY);
|
|
LogFilter filter = intent.getParcelableExtra(LogFilter.LOG_FILTER_INTENT_KEY);
|
|
-
|
|
|
|
if(filter == null){
|
|
if(filter == null){
|
|
this.clearFilter();
|
|
this.clearFilter();
|
|
} else {
|
|
} else {
|
|
@@ -178,32 +177,18 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- View rootView = inflater.inflate(this.getLayoutID(), container, false);
|
|
|
|
-
|
|
|
|
- LinearLayout plotLayout = (LinearLayout) rootView.findViewById(R.id.plot_layout);
|
|
|
|
- plotLayout.setWillNotDraw(false);
|
|
|
|
-
|
|
|
|
- container.setWillNotDraw(false);
|
|
|
|
-
|
|
|
|
- this.legendListView = (ListView) rootView.findViewById(R.id.legend_list_view);
|
|
|
|
- this.legendListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
|
- @Override
|
|
|
|
- public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
|
|
|
- StatisticsFragment.this.userTappedOnLegendItem(i);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- this.rootView = rootView;
|
|
|
|
- rootView.setWillNotDraw(false);
|
|
|
|
|
|
+ this.rootView = inflater.inflate(this.getLayoutID(), container, false);
|
|
|
|
|
|
- this.configureRootView(rootView);
|
|
|
|
|
|
+ this.configureRootView(this.rootView);
|
|
|
|
|
|
- return rootView;
|
|
|
|
|
|
+ return this.rootView;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
super.onCreate(savedInstanceState);
|
|
setHasOptionsMenu(true);
|
|
setHasOptionsMenu(true);
|
|
|
|
+ setRetainInstance(true);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -213,24 +198,10 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
|
|
|
ViewGroup container = (ViewGroup) this.getView();
|
|
ViewGroup container = (ViewGroup) this.getView();
|
|
container.removeAllViewsInLayout();
|
|
container.removeAllViewsInLayout();
|
|
- View rootView = inflater.inflate(this.getLayoutID(), container, false);
|
|
|
|
-
|
|
|
|
- container.addView(rootView);
|
|
|
|
|
|
+ this.rootView = inflater.inflate(this.getLayoutID(), container, false);
|
|
|
|
+ container.addView(this.rootView);
|
|
|
|
|
|
- LinearLayout plotLayout = (LinearLayout) rootView.findViewById(R.id.plot_layout);
|
|
|
|
- plotLayout.setWillNotDraw(false);
|
|
|
|
-
|
|
|
|
- this.legendListView = (ListView) rootView.findViewById(R.id.legend_list_view);
|
|
|
|
- this.legendListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
|
- @Override
|
|
|
|
- public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
|
|
|
- StatisticsFragment.this.userTappedOnLegendItem(i);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- this.rootView = rootView;
|
|
|
|
- rootView.setWillNotDraw(false);
|
|
|
|
-
|
|
|
|
- this.configureRootView(rootView);
|
|
|
|
|
|
+ this.configureRootView(this.rootView);
|
|
}
|
|
}
|
|
|
|
|
|
private Context getBaseContext(){
|
|
private Context getBaseContext(){
|
|
@@ -244,9 +215,19 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
public void configureRootView(View rootView){
|
|
public void configureRootView(View rootView){
|
|
LinearLayout plotLayout = (LinearLayout) rootView.findViewById(R.id.plot_layout);
|
|
LinearLayout plotLayout = (LinearLayout) rootView.findViewById(R.id.plot_layout);
|
|
plotLayout.setWillNotDraw(false);
|
|
plotLayout.setWillNotDraw(false);
|
|
-
|
|
|
|
plotLayout.removeAllViews();
|
|
plotLayout.removeAllViews();
|
|
|
|
|
|
|
|
+ plotLayout.setWillNotDraw(false);
|
|
|
|
+
|
|
|
|
+ this.legendListView = (ListView) rootView.findViewById(R.id.legend_list_view);
|
|
|
|
+ this.legendListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
|
|
|
+ StatisticsFragment.this.userTappedOnLegendItem(i);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ rootView.setWillNotDraw(false);
|
|
|
|
+
|
|
this.actualiseCurrentPlot();
|
|
this.actualiseCurrentPlot();
|
|
|
|
|
|
ImageButton visualButton = (ImageButton) rootView.findViewById(R.id.plot_data_button);
|
|
ImageButton visualButton = (ImageButton) rootView.findViewById(R.id.plot_data_button);
|