Android Open Source - AerisAndroidLibrary Places 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;
/* ww w  . ja  v a 2  s . co  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.model.Place;
import com.hamweather.aeris.response.PlacesResponse;
import com.hamweather.aeris.util.WeatherUtil;

public class PlacesItemHolder implements AdapterHolder<PlacesResponse> {

  private TextView placeTextView;
  private ImageView icon;
  private TextView countTextView;

  public View inflateview(LayoutInflater mInflater) {
    View view = mInflater.inflate(R.layout.drawer_list_item, null, false);
    placeTextView = (TextView) view.findViewById(;
    icon = (ImageView) view.findViewById(;
    countTextView = (TextView) view.findViewById(;
    return view;

  public void populateView(PlacesResponse t, int position) {
    Place place = t.getPlace();
    String text = "";
    if (place.state != null && place.state.length() > 0) {
      text = String.format("%s, %s, %s",
    } else {
      text = String.format("%s, %s", WeatherUtil.capitalize(,



Java Source Code List