How to change three dots button on android to other button

后端 未结 6 2078
天涯浪人
天涯浪人 2020-12-06 01:15

I wanna change the three dots button on Android to other button which is an \"Add\" button. How to do it? I have changed set the button in my drawable, but it keep prompt th

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 01:57

    Sorry I don't have enough reputation to post a comment. Here is the best answer I found, its one line of code:

    myToolbar.setOverflowIcon(ContextCompat.getDrawable(getApplicationContext(),R.drawable.my_drawable));
    

    The link for the original answer is here: https://stackoverflow.com/a/35790470/4575772

提交回复
热议问题