/**
* listview单击
*/
msgListView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View listItemView,
final int position, long id) {
final AnimationDrawable anim = (AnimationDrawable) listItemView
.findViewById(R.id.voice_sound_size).getBackground();
anim.start();
MediaManager.playSound(mDatas.get(position).getVoicepath(),
new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
anim.selectDrawable(0);
anim.stop();
MediaManager.release();
}
});
mDatas.get(position).setReader(true);
// mDatas.get(position).setVoice_anim(!mDatas.get(position).getVoice_anim());
String sql = "update voice set voice_isPlay = 0 where voice_name =?";
voiceDB.execSQL(sql, new Object[] { mDatas.get(position)
.getVoice_name() });
adapter.notifyDataSetChanged();
}
});