[英]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.