Change image Floating Action Button Android

前端 未结 9 491
旧时难觅i
旧时难觅i 2020-12-16 09:19

I used this library https://github.com/futuresimple/android-floating-action-button. How can I change the image of the main button? I want to change the button image right af

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 10:02

    in kotlin, this will be

    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
    private fun pauseTimer() {
    floatingActionButton.setImageDrawable(getDrawable(R.drawable.ic_baseline_play_arrow))
    

    happy coding, Nenad

提交回复
热议问题