コード例 #1
0
  @Override
  public View getHeaderView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
      LayoutInflater inflater =
          (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      convertView = inflater.inflate(R.layout.item_header, null);
    }
    Anime item = mList.get(position);

    TextView mHeaderTitle = (TextView) convertView.findViewById(R.id.item_header_title);

    mHeaderTitle.setText(mDaysList[item.getDay()]);

    return convertView;
  }
コード例 #2
0
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
    rootView = convertView;

    if (rootView == null) {
      LayoutInflater inflater =
          (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      rootView = inflater.inflate(R.layout.item_schedule_item, null);
    }

    final Anime item = mList.get(position);

    TextView mAnimeName = (TextView) rootView.findViewById(R.id.item_schedule_anime_name);
    TextView mAnimeReleaseTime =
        (TextView) rootView.findViewById(R.id.item_schedule_anime_release_time);

    mAnimeName.setText(item.getName());
    mAnimeReleaseTime.setText(Utils.convertAnimeReleaseTimeToLocal(item.getTime()));

    return rootView;
  }