@Override
 public void errorHandling(Exception error) {
   // Let's check if were still attached to an activity
   if (isAdded()) {
     super.errorHandling(error);
   }
 }
  @Override
  public void onConnectionOk() {
    super.showSpinner(true);
    mDomoticz = new Domoticz(mContext);
    mSwipeRefreshLayout = (SwipeRefreshLayout) getView().findViewById(R.id.swipe_refresh_layout);
    listView = (ListView) getView().findViewById(R.id.listView);

    processUserVariables();
  }
 @Override
 public void Filter(String text) {
   filter = text;
   try {
     if (adapter != null) adapter.getFilter().filter(text);
     super.Filter(text);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
  private void createListView() {
    if (getView() != null) {
      SwingBottomInAnimationAdapter animationAdapter = new SwingBottomInAnimationAdapter(adapter);
      animationAdapter.setAbsListView(listView);
      listView.setAdapter(animationAdapter);

      mSwipeRefreshLayout.setRefreshing(false);
      mSwipeRefreshLayout.setOnRefreshListener(
          new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
              processUserVariables();
            }
          });
      super.showSpinner(false);
      this.Filter(filter);
    }
  }
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   mContext = context;
   getActionBar().setTitle(R.string.title_vars);
 }