Java – why does Android’s onItemClick require a long line ID?

For listview, when you register onitemclicklistener, the method you specify is as follows:

public abstract void onItemClick(AdapterView parent,View view,int position,long id)

ID corresponds to the row that the user clicked My question is why is it long instead of int? When will you use it? When I use it, I always convert it to int, so it makes me think I may be wrong

Solution

I think this came directly to us from SQLite:

In view of this, the Android API seems to naturally specify 64 bits for the ID of the database row

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>