コード例 #1
0
  public AnimateRssItem(Context context, final AnimateRss rss, Intent callOutIntent) {
    super(context);

    app = (App) context.getApplicationContext();
    this.rss = rss;

    RelativeLayout rl =
        (RelativeLayout)
            ((Activity) context).getLayoutInflater().inflate(R.layout.item_rss_animate, null);

    ivThumb = (ImageView) rl.findViewById(R.id.imageView_rss_animate_thumb);
    tvTitle = (TextView) rl.findViewById(R.id.textView_rss_animate_title);
    tvLength = (TextView) rl.findViewById(R.id.textView_rss_animate_length);
    tvTotal = (TextView) rl.findViewById(R.id.textView_rss_animate_total);

    if (rss.getRanking() == 0) {
      tvTitle.setText(rss.getTitle());
    } else {
      tvTitle.setText("第" + rss.getRanking() + "位:" + rss.getTitle());
    }
    tvLength.setText(rss.getNicoInfoLength());
    String total =
        "Play:<font color='#0000a0'>"
            + rss.getNicoInfoTotalView()
            + "</font>"
            + " Res:<font color='#0000a0'>"
            + rss.getNicoInfoTotalRes()
            + "</font>"
            + " My:<font color='#0000a0'>"
            + rss.getNicoInfoTotalMylist()
            + "</font>";
    tvTotal.setText(Html.fromHtml(total));

    this.addView(rl);
  }
コード例 #2
0
 public void fillThumbTask() {
   FillThumbTask fillThumbTask = new FillThumbTask();
   fillThumbTask.execute(rss.getNicoThumbnail());
   app.fillThumbTasks.add(fillThumbTask);
 }