为了账号安全,请及时绑定邮箱和手机立即绑定

单击标记时无法调用我的自定义信息窗口

单击标记时无法调用我的自定义信息窗口

德玛西亚99 2022-12-28 14:11:35
我正在设置一个新的自定义信息窗口。我有一堆来自 API 的标记,我试图将它们的数据放在 TextView 中,但到目前为止我都失败了。我尝试将 ArrayList 数据放入一个数组中并调用它。尝试关注互联网上几乎所有的视频或文章,但都失败了!<?xml version="1.0" encoding="utf-8"?><LinearLayout    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Name"        android:id="@+id/tv_stfOrStrName"/>    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Name"        android:id="@+id/tv_totPriceAll"/>    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Name"        android:id="@+id/tv_lastOrdTime"/>    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Name"        android:id="@+id/tv_ordCountView"/>    <TextView        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Name"        android:id="@+id/tv_firstOrDatsSinceLast"/></LinearLayout>public class InfoObjectData {    private String count;    private String firstOrLastDay;    private String lastTime;    public InfoObjectData() {    }    public void setCount(String count) {        this.count = count;    }    public void setFirstOrLastDay(String firstOrLastDay) {        this.firstOrLastDay = firstOrLastDay;    }    public void setLastTime(String lastTime) {        this.lastTime = lastTime;    }    public String getCount() {        return count;    }    public String getFirstOrLastDay() {        return firstOrLastDay;    }    public String getLastTime() {        return lastTime;    }}
查看完整描述

1 回答

?
哔哔one

TA贡献1854条经验 获得超8个赞

在标记中使用 setTag(obj),其中对象与您在适配器中使用的对象相同



查看完整回答
反对 回复 2022-12-28
  • 1 回答
  • 0 关注
  • 80 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号