Пример #1
0
  public void getXmlOutput(ArrayList<Entry> conditioningArray) {
    Log.d("------------", "" + conditioningArray);
    if (this.isResumed()) {
      txtEmpty = (TextView) v.findViewById(android.R.id.empty);
      if (conditioningArray.size() == 0) {
        txtEmpty.setVisibility(TextView.VISIBLE);
        Log.v("no responce", "null data");
      } else {
        txtEmpty.setVisibility(TextView.GONE);
        Log.v("responce", "data");
      }
      this.mConditioningResult = conditioningArray;

      noOfItem = mConditioningResult.size();

      mListView = (ListView) v.findViewById(android.R.id.list);
      mConditioningListAdapter =
          new InjuryPreventionListAdapter(this.getActivity(), mConditioningResult);
      mListView.setAdapter(mConditioningListAdapter);

      onInjuryItemClick();

      setSize();
    }
    context.removeDialog(0);
  }
Пример #2
0
  public void getParsingData() {
    // appStatus = AppStatus.getInstance(this);
    context.showDialog(0);
    if (HeadsUpNativeActivity.appStatus.isOnline()) {

      String xml_url = XmlUrl.getXmlUrl(XmlID.Conditioning);
      new XmlTask(this).execute(xml_url);

      // InputStream inputStream = Connect.INSTANCE
      // .getXmlFromUrl(xml_url);
      // injuryPreventionArray = XmlParser.INSTANCE
      // .parse(inputStream);
    } else {

      Log.v("Conditioning Activity", "App is not online!");
      Intent intent = new Intent(context, NoConnectivityScreen.class);
      this.startActivity(intent);
      context.finish();
    }
  }