开发者

click event for dynamic generated buttons

开发者 https://www.devze.com 2023-02-21 13:42 出处:网络
hii am generating buttons dynamically in whic开发者_JS百科h i want to implement click event for each button .how can i do thisbtn.setOnClickListener(new OnClickListener()

hi i am generating buttons dynamically in whic开发者_JS百科h i want to implement click event for each button .how can i do this


    btn.setOnClickListener(new OnClickListener()
    {
        @Override
        public void onClick(View v)
        {
            //your code here
        }
    })
0

精彩评论

暂无评论...
验证码 换一张
取 消