Forum Xamarin Xamarin.Android

listview - disable clickevent after click it once

ShumzShumz INMember ✭✭

hello everyone. i have a listview in which a textview is their .i want to enable click event after click it once that is if item is select by another user then it will not select by another user and also want to change its background so that user get to know this that particular item is already selected.
i used base adapter and clickevent for selecting an itemlist .plz help me guys.

public override View GetView(int position, View convertView, ViewGroup parent)
View row = convertView;
if (!IsEnabled(position)) {
if (row == null)
row = LayoutInflater.From(mContext).Inflate(mLayout, parent, false);
row.FindViewById(Resource.Id.textView1).Text = mSlotType[position].slotName;

            // row.FindViewById<TextView>(Resource.Id.textView1).Typeface = Typeface.DefaultBold;
        return row;

Best Answers


  • ShumzShumz INMember ✭✭

    i have a listview consist of textview . each textview show a time . application flow is that user have to select one time at a time but if that time is already selected and saved on remote data then that particular data can't be select by user. thus i need to make a changes that when user go to that activity then listview show item in tow diifernt text color .one (green)is which he can select and another(grey) is that he cant select(as it is already selected by another user) on the bases of remote data(mysql). how can i do this do u have any suggestion.

Sign In or Register to comment.