안녕하세요 동적으로 edittext를 생성하여 settext를 하려는데 동적으로 생성된 edittext중에 마지막 꺼에만 글자가 들어갑니다.
int numButton = 1;
생성 메소드
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
rowView = inflater.inflate(R.layout.dynamic_layout, null);
dynamic_explan = (EditText) rowView.findViewById(R.id.dynamic_explan);
dynamic_explan.setId(numButton);
++numButton;
mContainerView.addView(rowView, 0);
위와 같이 생성을 한 다음 for문을 이용하여(editetext 생성 갯수만큼) settext를 하려고 합니다.
dynamic_explan.getId();
dynamic_explan.setId(i-포문의 i 값입니다.);
이런식으로 가져와서 dynamic_explan.setText("aaaaa"); 이렇게 해보려 하는데
마지막에 있는 editeText에만 글짜가 써집니다.
고수님들의 답변 요청드립니다.