Пример #1
0
 @Override
 public void errorHandling(Exception error) {
   // Let's check if were still attached to an activity
   if (isAdded()) {
     super.errorHandling(error);
   }
 }
Пример #2
0
  @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();
  }
Пример #3
0
 @Override
 public void Filter(String text) {
   filter = text;
   try {
     if (adapter != null) adapter.getFilter().filter(text);
     super.Filter(text);
   } catch (Exception ex) {
     ex.printStackTrace();
   }
 }
Пример #4
0
  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);
    }
  }
Пример #5
0
 @Override
 public void onAttach(Context context) {
   super.onAttach(context);
   mContext = context;
   getActionBar().setTitle(R.string.title_vars);
 }