det*_*o29 5 android button android-listview onclicklistener
我有一个ListView包含a 的自定义Button.此按钮的功能是删除按钮.每当用户单击此按钮时,将删除当前行.
onClickListener此按钮?提前致谢.
在您的Custom Adapater类中getView()
buttonDelete.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v)
{
// Use position parameter of your getView() in this method it will current position of Clicked row button
// code for current Row deleted...
}
});
Run Code Online (Sandbox Code Playgroud)