[英]How to Bind menu item with listview
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.action_refresh -> {
refreshList()
true
}
else -> super.onOptionsItemSelected(item)
}
}
private fun refreshList() {
// Use this method to load the songs just like you might be using the same in OnCreate currently
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.