android: styling ListView items from custom CursorAdapter -


I have a custom cursor adapter that I want to increase custom item layout and style accordingly, as the code below Is shown in. My point is that sometimes the wrong style information is given, even if the data coming from the DB is correct (hence, for the example given below, I will get isEvent == true ) but on this style It will run as if isEvent == incorrect .

Is this a known bug? Am I doing something wrong or what can I do to fix it?

  Private class event adapter cursor adapter {public event adapters (context reference) (su Override public view new view (reference references, cursor cursor, view group parent) {return getayoutInflater (. Layout). Event_view_list_item, parent, wrong); @ Override public zero-bound view (see View, context reference, cursor cursor) {last boolean isEvent = cursor.getInt (EventQuery.IS_EVENT) == Event.EVENT; last string eventName = cursor GetString (EventQuery.NAME); Last TextView Event NameView = (TextView) view.findViewById (R.id.eve) nt_name); If (isEvent) {eventNameView.setText (eventName); View.findViewById (R.id.arrow) .setVisibility (View.VISIBLE); View.findViewById (R.id.in_play_icon) .setVisibility (View.GONE); } And {eventNameView.setText (cursor.getString (EventQuery.NAME)); I think this is just a matter of reusing Android's old issue. I & nsquo;}}}  

Viewed

by resetting the view and fixing where appropriate

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -