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

我正在设置一个新的自定义信息窗口。我有一堆来自 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;

    }

}


德玛西亚99
浏览 89回答 1
1回答

哔哔one

在标记中使用 setTag(obj),其中对象与您在适配器中使用的对象相同
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java