public void bindView(View view, Context context, Cursor cursor) {
String ringtonetitle=""; ringtonetitle= cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE)); TextView ringtone = (TextView) view.findViewById(R.id.ringtonetext); ringtone.setText(ringtonetitle); ImageView ringtone_selectimage =(ImageView)view.findViewById(R.id.ringtone_selectimage); if((mClickedPos -mStaticItemCount)== cursor.getPosition()){ //defaultrinetone=""; ringtone_selectimage.setVisibility(View.VISIBLE); }else{ Uri uri = mRingtoneManager.getRingtoneUri(cursor.getPosition()); if(defaultrinetone.equals(uri.toString())){ ringtone_selectimage.setVisibility(View.VISIBLE); }else{ ringtone_selectimage.setVisibility(View.GONE); } } }
@Override public View newView(Context context, Cursor cursor, ViewGroup parent) { // TODO Auto-generated method stub return mFactory.inflate(R.layout.ringtoneadapter, parent, false); }
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:orientation="horizontal" android:layout_height="wrap_content" android:id="@+id/ringtoneadaline"> <TextView android:id="@+id/ringtonetext" android:textSize="20sp" android:layout_marginLeft="5dip" android:layout_height="wrap_content" android:text="@string/alarmclock" android:layout_gravity="center_vertical" android:layout_width="250dip" android:shadowRadius="0" android:shadowDy="1.0" android:shadowDx="0" android:shadowColor="#ffffffff" android:textColor="#ff000000"/> <ImageView android:id="@+id/ringtone_selectimage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/start" android:layout_gravity="right|center_vertical" android:visibility="gone"/> </LinearLayout>
一旦按住屏幕上下滑动之后,再触摸item,就没有任何反应了,还请高手大神们救救啊!
如上图,把下面的item刷上去之后 ,再触摸就没反应 不知道咋回事,还请大神指点啊