I have several EditText
within an item in my list ExpandleListView
.
Always clicking on EditText
the following message will appear and no text will be typed in the field:
getSelectedText on inactive InputConnection
getTextBeforeCursor on inactive InputConnection
getTextBeforeCursor on inactive InputConnection
public View buscaView(int groupPosition){
if(listaHolder.size() > 0){
for(int i = 0; i < listaHolder.size(); i++){
if(listaHolder.get(i).position == groupPosition){
return listaHolder.get(i).convertView;
}
}
}
return null;
}
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
if(buscaView(groupPosition) == null) {
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.adapter_aneurisma, null);
holder = new ItemSuporte();
// Editexts
holder.aneurismaLargura = (EditText) convertView.findViewById(R.id.et_largura);
holder.aneurismaComprimento = (EditText) convertView.findViewById(R.id.ed_comprimento);
holder.ed_colo = (EditText) convertView.findViewById(R.id.ed_colo);
holder.ed_causa = (EditText) convertView.findViewById(R.id.ed_causa);
holder.ed_descricao = (EditText) convertView.findViewById(R.id.ed_descricao);
holder.ed_tratamento = (EditText) convertView.findViewById(R.id.ed_tratamento);
holder.ed_resultado_imediato = (EditText) convertView.findViewById(R.id.ed_resultado_imediato);
holder.ed_n_clips = (EditText) convertView.findViewById(R.id.ed_n_clips);
holder.ed_tempo_clipagem_temporaria = (EditText) convertView.findViewById(R.id.ed_tempo_clipagem_temporaria);
holder.ed_n_coils = (EditText) convertView.findViewById(R.id.ed_n_coils);
holder.ed_descricao_complicacoes_especificas = (EditText) convertView.findViewById(R.id.ed_descricao_complicacoes_especificas);
// Checkbos
holder.cb_insucesso_terapeutico = (CheckBox) convertView.findViewById(R.id.cb_insucesso_terapeutico);
holder.cb_paralisia_incompleta = (CheckBox) convertView.findViewById(R.id.cb_paralisia_incompleta);
holder.cb_paralisia_completa = (CheckBox) convertView.findViewById(R.id.cb_paralisia_completa);
holder.cb_clipagem_temporaria = (CheckBox) convertView.findViewById(R.id.cb_clipagem_temporaria);
holder.cb_balao = (CheckBox) convertView.findViewById(R.id.cb_balao);
holder.cb_stent = (CheckBox) convertView.findViewById(R.id.cb_stent);
holder.cb_complicacoes_especificas_procedimento = (CheckBox) convertView.findViewById(R.id.cb_complicacoes_especificas_procedimento);
// View
holder.conainner = (View) convertView.findViewById(R.id.container);
//holder.convertView = convertView;
holder.position = groupPosition;
holder.convertView = convertView;
//holder.convertView.setTag(holder);
// Adicionando cada view do ExpandleListView.
listaHolder.add(holder);
Log.e("Adapter", "Criou uma nova instância da View...");
}
else{
Log.e("Adapter","Retornou uma instância existente..., Total de holders: " + listaHolder.size());
holder = (ItemSuporte) buscaView(groupPosition).getTag();
}
return buscaView(groupPosition);
}