更新时间:2023-11-19 12:43:58
您需要使用 AudioManager
类。开发者文档是这里。根据您想要的音量调节(振铃/媒体),您可能需要通过 AudioManager
更改audiomode。
You need to use the AudioManager
class. Developer doc is here. Depending on which volume you want to adjust (ringer/media) you may need to change the audiomode via AudioManager
.
最后,为了使按钮消失只是使用View.GONE他们。我想创建一个的Runnable
在 onClickListener
和使用 postDelayed
让查看
消失。
Finally, to make the buttons disappear just use View.GONE on them. I would create a Runnable
in the onClickListener
and use a postDelayed
to make the View
disappear.