I am booking bowling lines and I have a specific problem in my listview, I have custom adapters to it: < / P>
Public reservation adapters (reference references, list & quot; reservation & gt; items, int year, int month, int day) {this.context = context; This.listReservations = Items; this. Year = year; This.month = months; This.day = day; } / * Private View Holder Class * / See Private Class Holder {Text View Time; Button reserved; } View public view getView (integer status, seeviewview, ViewGroup parent) {Final Viewholder holder; Layout Influencer Aminflur = (Layout Inflator) Reference. Gate System System (Activity LAOUT_INFLATER_SERVICE); If (convertView == empty) {convertView = mInflater.inflate (R.layout.rowitem_reservation_layout, null); Holder = new viewholder (); Holder.time = (text view) ConvertviewfindbackBiID (R.D.Reserve_textestiver); Holder Research = (Button) Convertview.FindVBIID (R.D.Reserve_Buttons); ConvertView.setTag (holder); } And {holder = (seeholder) ConvertView.gettag (); } Reservation = (reservation) getItem (status); Calendar Calendar = Calendar.getInstance (); Calendar.set (year, month, day); Calendar CalendarTags = Calendar.Ast Instance (); Holder.time.Stext (Reservations .getStartHour () + ": 00 -" + Reservations. GetandHor () + ": 00"); Holder.reserve.setTag (Reservation .getStartHour () + ": 00 -" + Reservations. GetandAugher () + ": 00"); If (Reservation .getStartHour () & lt; = calendar.get (calendar.HOUR_OF_DAY) & amp; amp; calendar; parallel (calendartoode) {holder.reserve.setBackgroundResource (R.drawable.closed_button); Holder.reserve.setClickable (wrong); Holder.reserve.setFocusable (wrong); Holder.reserve.setText ("off"); } Else {if (reservation.isReserved ()) {holder.reserve.setBackgroundResource (R.drawable.reserved_button); Holder.reserve.setClickable (wrong); Holder.reserve.setFocusable (wrong); Holder.reserve.setText ("secure"); } Else {if (reservation.isseelected ()) {holder.reserve.setBackgroundResource (R.drawable.selected_button); Holder.reserve.setClickable (true); Holder.reserve.setFocusable (true); Holder.reserve.setText ("selected"); } Other {holder .reserve.setBackgroundResource (R.drawable.nonreserved_button); Holder.reserve.setClickable (true); Holder.reserve.setFocusable (true); Holder.reserve.setText ("Free"); }}} Holder Research. SetId (status); Return Convertview; }
This increases the base adapter, the method gets, getCount, getItem and getItemId just do not paste them here.
Problem: Sometimes sometimes a line that needs to be closed
Please help me solve this problem
No comments:
Post a Comment