1
Button과 TextView가있는 ListView가 있는데 Button을 클릭하면 TextView의 텍스트를 변경하려고합니다. 나는 클릭을 처리하고 버튼을 클릭하면 android:onClick="myClickHandler"
TextView의 텍스트 값을 변경하지만 문제는 ListView를 스크롤 할 때 ListView의 다른 셀에 같은 텍스트가있는 것입니다. 이 문제를 어떻게 해결할 수 있습니까?
tanx 많이 있습니다.
이은
Button을 클릭하면 ListView에서 TextView의 텍스트를 어떻게 바꿀 수 있습니까?
public void myClickHandler(View v)
{
//get the row the clicked button is in
LinearLayout vwParentRow = (LinearLayout)v.getParent();
TextView child = (TextView)vwParentRow.getChildAt(1);
child.setText("bma bla");
}
대답은 tanx입니다. 나는 당신의 해결책을 시도 할 것입니다. – aminovic09