I am  implementing the android style barButton on my listview on the
footer part.
My ListView has a checkbox and two item fields on it.
When i check the checkbox i want to display the footer part.

I am implementing on the BaseAdapter and when the checkbox is checked
is use as:

public View getView(int position, View convertView, ViewGroup parent)
{
                ViewHolder holder = null;
                if (convertView == null) {
                        holder = new ViewHolder();
                        convertView = 
inflater.inflate(R.layout.inbox_email_list_edit,
null);
                        holder.checkBox = (CheckBox)
convertView.findViewById(R.id.message_edit_check);
                        holder.fromText = (TextView)
convertView.findViewById(R.id.message_check_from);
                        holder.subjectText = (TextView)
convertView.findViewById(R.id.message_check_subject);
                        rLay =
(RelativeLayout)convertView.findViewById(R.id.MessageButtonLayout);
                        holder.cancelBtn =
(Button)convertView.findViewById(R.id.inbox_cancel);
                        holder.deleteBtn =
(Button)convertView.findViewById(R.id.inbox_delete);
                        convertView.setTag(holder);
                } else {
                        holder = (ViewHolder) convertView.getTag();
                }

                
holder.fromText.setText(list.get(position).getFrom().toString());
        
holder.subjectText.setText(list.get(position).getSubject().toString());
                holder.checkBox.setOnCheckedChangeListener(new
OnCheckedChangeListener() {

                        @Override
                        public void onCheckedChanged(CompoundButton buttonView, 
boolean
isChecked) {
                                if(isChecked){
                                        Log.i("FOOTER", "I am checked");
                                        rLay.setVisibility(View.VISIBLE); // 
why does this fail? or am i
doing something out of box.
Any suggestion please.

                                }

                        }
                });
                holder.checkBox.setChecked(checkState.get(position));

                return convertView;
        }

        static class ViewHolder {
                TextView fromText;
                TextView subjectText;
                CheckBox checkBox;
                Button cancelBtn;
                Button deleteBtn;

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to