Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一些教程或任何简单的投票支持/投票反对android上的任何图片的开源实现。类似于热或不热的东西。
你能告诉我如何实现它吗?我应该保持向上/向下按钮不变并更改图片还是需要更改整个活动?
谢谢
您无需更改活动。只需实现 ImageView。进行投票后,只需更改 ImageView 中的图片。setImageResource(R.drawable.something);或存储中的图像文件。编辑:投票可以存储在首选项中。
setImageResource(R.drawable.something);