Example #1
0
 @Override
 public void setListener() {
   tongbaoCount.setOnClickListener(this);
   tongbaoTeleCharge.setOnClickListener(this);
   tongbaoJifen.setOnClickListener(this);
   tongbaoStore.setOnClickListener(this);
 }
Example #2
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.userinfo_mail:
       IntentUtils.sendEmail(this);
       break;
     case R.id.userinfo_qq:
       ClipboardUtils.copyToClipboard(this, mQQ.getDetailText().toString());
       ToastUtils.showShort("复制QQ群号码成功!");
       IntentUtils.gotoQQ(this);
       break;
     default:
       break;
   }
 }
Example #3
0
 @Override
 public void setListener() {
   mMail.setOnClickListener(this);
   mQQ.setOnClickListener(this);
 }
Example #4
0
 private void setCommonItem(CommonItem commonItem, String summaryTxt, String detailTxt) {
   commonItem.setType(Type.SummaryTxt_DetailTxtDetailImg);
   commonItem.setSummaryText(summaryTxt);
   commonItem.setDetailText(detailTxt);
   commonItem.setDetailImg(R.mipmap.icon_triangle_arrow);
 }
Example #5
0
  @Override
  public void initView() {
    tongbaoCount.setType(Type.All);
    tongbaoCount.setSummaryImg(R.drawable.tongbao_detail);
    Spanny count =
        new Spanny(
            "2",
            new ForegroundColorSpan(getResources().getColor(R.color.txt_red)),
            new AbsoluteSizeSpan(DensityUtils.sp2px(this, 24)));
    tongbaoCount.setSummaryText(count);
    tongbaoCount.setDetailText("查看铜板详情");
    tongbaoCount.setDetailImg(R.mipmap.icon_triangle_arrow);

    tongbaoTeleCharge.setType(Type.SummaryImgSummaryTxt_DetailImg);
    tongbaoTeleCharge.setSummaryImg(R.drawable.tongbao_tele_charge);
    Spanny charge =
        new Spanny(
                "兑换话费\n",
                new ForegroundColorSpan(getResources().getColor(R.color.txt_red)),
                new AbsoluteSizeSpan(DensityUtils.sp2px(this, 16)))
            .append(
                "2000铜板起兑",
                new ForegroundColorSpan(getResources().getColor(R.color.txt_gray)),
                new AbsoluteSizeSpan(DensityUtils.sp2px(this, 12)));
    tongbaoTeleCharge.setSummaryText(charge);
    tongbaoTeleCharge.setDetailImg(R.mipmap.icon_triangle_arrow);

    tongbaoJifen.setType(Type.SummaryImgSummaryTxt_DetailImg);
    tongbaoJifen.setSummaryImg(R.drawable.tongbao_jifen);
    Spanny jifen =
        new Spanny(
                "兑换集分宝\n",
                new ForegroundColorSpan(getResources().getColor(R.color.txt_red)),
                new AbsoluteSizeSpan(DensityUtils.sp2px(this, 16)))
            .append(
                "1铜板起兑",
                new ForegroundColorSpan(getResources().getColor(R.color.txt_gray)),
                new AbsoluteSizeSpan(DensityUtils.sp2px(this, 12)));
    tongbaoJifen.setSummaryText(jifen);
    tongbaoJifen.setDetailImg(R.mipmap.icon_triangle_arrow);

    tongbaoStore.setType(Type.SummaryImgSummaryTxt_DetailImg);
    tongbaoStore.setSummaryImg(R.drawable.tongbao_store);
    Spanny store =
        new Spanny(
                "铜板商城\n",
                new ForegroundColorSpan(getResources().getColor(R.color.txt_red)),
                new AbsoluteSizeSpan(DensityUtils.sp2px(this, 16)))
            .append(
                "试运行",
                new ForegroundColorSpan(getResources().getColor(R.color.txt_gray)),
                new AbsoluteSizeSpan(DensityUtils.sp2px(this, 12)));
    tongbaoStore.setSummaryText(store);
    tongbaoStore.setDetailImg(R.mipmap.icon_triangle_arrow);
  }