Hi, this is my getView method:
public View getView(final int position, View convertView, final ViewGroup parent) {
ViewHolder holder;
if(convertView == null){
holder = new ViewHolder();
convertView = inflater.inflate(R.layout.propviewlistrow, null);
holder.title = (TextView) convertView.findViewById(R.id.propviewlistrow_t1);
holder.content = (EditText) convertView.findViewById(R.id.propviewlistrow_e1);
convertView.setTag(holder);
}
else{
holder = (ViewHolder)convertView.getTag();
}
holder.title.setText(names.get(position));
holder.content.setText(values.get(position));
holder.content.addTextChangedListener(new TextWatcher(){
public void afterTextChanged(Editable s) {
values.set(position, s.toString());
}
public void beforeTextChanged(CharSequence s, int start,
int count, int after) {
}
public void onTextChanged(CharSequence s, int start,
int before, int count) {
}
});
return convertView;
}
}
But this does not work. The edittexts do not display the proper text, the displayed text switches while scrolling. The next issue is, I have set android:windowSoftInputMode="adjustPan" in the manifest. If you click the into the last edittext, the listview won't scroll up enough so that you can see what you are typing.