How to Enable/Disable button if list has data or not
<p>I am making a Birthday Reminder App, in which i am <strong>allowing user to add birthdays for their friends those numbers are stored</strong> in Phone Book</p>

<p>Now i am trying to do small change, like <em>here i want if User has already added birthday for Phonebook friend then no need to show AddBirthday button, and if user has not added birthday for Phonebook friend then need to show AddBirthday button</em>.</p>

<p>like in my phone book, person name Akshat for him i have already added birthday, but here i am also getting AddBirthday button, but now i want to disable this AddBirthday Button</p>

<p><strong>AccountDatesOfBirthAdapter.java:</strong></p>

<pre><code>@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (position == 0) {
        if (convertView == null) {
            convertView = this.inflater.inflate(R.layout.editor_account, null);
        }

        ImageView accountIcon = (ImageView) convertView.findViewById(R.id.editor_icon);
        accountIcon.setImageDrawable(this.accountIcon);

        TextView accountType = (TextView) convertView.findViewById(R.id.editor_type);
        accountType.setText(this.accountType);

        TextView accountName = (TextView) convertView.findViewById(R.id.editor_name);
        accountName.setText(this.accountName);

        // To Do:: Enable and Disable button (Birthday Added or not)
        addDateOfBirth = (ImageButton) convertView.findViewById(R.id.editor_new);
        addDateOfBirth.setOnClickListener(this);

        }
        else 
        {               
        DateOfBirth dateOfBirth = this.datesOfBirth.get(position - 1);

        if (convertView == null) {
            convertView = this.inflater.inflate(R.layout.editor_dateofbirth, null);
        }

        TextView date = (TextView) convertView.findViewById(R.id.editor_date);
        date.setText(dateFormatter.format(dateOfBirth.getDate().getTime()));
    }
    return convertView;
}
</code></pre>
