1

我想将animate箭头指向某个点的方向ListView。类似于您在 GPS 中看到的内容(箭头随着车辆改变方向而移动)。

    @Override
public View getView(int position, View convertView, ViewGroup parent) {
    View row = convertView;


    if(row == null)
    {
        LayoutInflater inflater = ((Activity)context).getLayoutInflater();
        row = inflater.inflate(layoutResourceId, parent, false);

        holder = new DataHolder();
        holder.imgIcon = (ImageView)row.findViewById(R.id.imgIcon);
        holder.locationName = (TextView)row.findViewById(R.id.locationName);
        holder.locationElevation = (TextView)row.findViewById(R.id.locationElevation);
        heading = getHeading(); 

        row.setTag(holder);
    }
    else
    {
        holder = (MountainHolder)row.getTag();
    }

    Loc loc = data[position];
    holder.locationName.setText(loc.locationName);
    holder.locationElevation.setText(loc.locationElevation);
    holder.imgIcon.setImageResource(loc.icon);

    return row;
}

最初我添加了一个动画,holder.image但它会为所有动画(不是单独)制作动画。PS,图片是箭头。我有标题值,我只需要知道如何根据该信息为这些箭头设置动画。有任何想法吗?

4

0 回答 0