我使用的是ListView
,在我所充气另一个layout template
其中包含的2 Images, an edit text, a correction button , and 2 more buttons,
一个是快速编辑按钮,现在我想on click on this quick edit button
编辑文本应成为可编辑和correction button should become visible.
可以请你帮我。改变编辑框中的文本列表视图按钮点击android系统
从意见,为方便阅读:
mv.quick_edit = (ImageButton)convertView.findViewById
(R.id.gateway_list_info_image_button_temp);
mv.quick_edit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MyViewHolder m = new MyViewHolder();
m.correct_button.setVisibility(View.VISIBLE);
m.edit_text.setText("text changed");
}
});
我已经试过它..它不工作 – shruti
和你得到什么错误? –
,因为在onclick方法mView显示错误...因为它是在onclick方法的外部定义的 – shruti