Android Open Source - AerisAndroidLibrary Observation Item Holder

From Project

Back to project page AerisAndroidLibrary.


The source code is released under:

Apache License

If you think the Android project AerisAndroidLibrary listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.listview;
//from   w  w  w.ja  v a2s.  c o  m
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.demoaerisproject.R;
import com.hamweather.aeris.response.ObservationResponse;
import com.hamweather.aeris.util.FileUtil;
import com.hamweather.aeris.util.WeatherUtil;

public class ObservationItemHolder implements
    AdapterHolder<ObservationResponse> {

  ImageView weatherIcon;
  TextView place;
  TextView time;
  TextView weatherDesc;
  TextView temp;

  public View inflateview(LayoutInflater mInflater) {
    View v = mInflater.inflate(R.layout.listview_nearby_obs, null, false);
    weatherIcon = (ImageView) v.findViewById(;
    weatherDesc = (TextView) v.findViewById(;
    temp = (TextView) v.findViewById(;
    time = (TextView) v.findViewById(;
    place = (TextView) v.findViewById(;
    return v;

  public void populateView(ObservationResponse t, int position) {
        t.getObservation().icon, weatherIcon.getContext()));
        t.getObservation().dateTimeISO, "h:mm aa"));
    // tempF can be null with a successful response
    if (t.getObservation().tempF == null) {
    } else {



Java Source Code List