How to create image button in android?

后端 未结 3 952
栀梦
栀梦 2021-02-19 19:18

So I\'m new to android development...How can I create an image that acts like button, so when I press that image, image starts a specific activity. So I want this to show as ima

3条回答
  •  清酒与你
    2021-02-19 19:34

    It's an overcomplication to use "setOnClickListener()". Instead, use the 'onClick' property in XML:

    
    
    public void yourCallback(View view) 
    {
        ...
    }
    

提交回复
热议问题