Пример #1
0
  private void
      updateDisplay() { // This actually updates our display with the data we have parsed into the
    // Current class

    Current current =
        mForecast
            .getCurrent(); // Gets all of mCurrent's data in Forecast class so we can update them

    mTemperatureLabel.setText(
        current.getTemperature()
            + ""); // - NOTE: WE MUSHED THE INT VALUE WITH AN EMPTY STRING TO set the text
    mHumidityValue.setText(current.getHumidity() + "");
    mTimeLabel.setText("At " + current.getFormattedTime() + " it will be");
    mPrecipValue.setText(current.getPrecipChance() + "%");
    mWindSpeed.setText(current.getWindSpeed() + "mph");
    mSummaryLabel.setText(current.getSummary());
    Drawable iconPic = getResources().getDrawable(current.getIconId());
    mIconImageView.setImageDrawable(iconPic);
  }