我尝试使用此代码,但是当声音结束时,它会退出应用程序
itertools.groupby
我的代码:
from itertools import groupby
result = [{"name": "A", "score": 35, "other_details": ""},
{"name": "A", "score": 60,"other_details": ""},
{"name": "B", "score": 45, "other_details": ""},
{"name": "B", "score": 34, "other_details": ""},
{"name":"C", "score": 65, "other_details": ""}]
data_result = [max(list(v), key=lambda x: x["score"]) for k, v in groupby(sorted(result, key=lambda x: x["name"]), lambda x: x["name"])]
print(data_result)
声音播放完毕后,如何移动到下一个阵列?
答案 0 :(得分:0)
创建时仅在屏幕启动时第一次调用,您可能希望再次启动声音。
答案 1 :(得分:0)
您应通过
初始化imageView
imageView = findViewById(R.id....);
在onCreate()
方法中