public void setMetaInformation(MetaDataRetriever.MetaData meta) { if (meta == null) { return; } ImageButton artwork = (ImageButton) _panelView.findViewById(R.id.image_artwork); if (meta.artwork != null) { artwork.setImageBitmap(meta.artwork); } else { artwork.setImageResource(R.drawable.ic_launcher); } TextView text = (TextView) _panelView.findViewById(R.id.text_title); text.setText(meta.title); text = (TextView) _panelView.findViewById(R.id.text_artist); text.setText(meta.artistName); text = (TextView) _panelView.findViewById(R.id.text_position); text.setText(TimecodeUtils.START_POSITION); SeekBar bar = (SeekBar) _panelView.findViewById(R.id.seekbar_position); bar.setMax((int) meta.duration); bar.setProgress(0); text = (TextView) _panelView.findViewById(R.id.text_duration); text.setText(TimecodeUtils.format(meta.duration)); }
public void setPosition(int position) { SeekBar bar = (SeekBar) _panelView.findViewById(R.id.seekbar_position); Boolean isDragging = (Boolean) bar.getTag(R.id.tag_is_dragging); if (isDragging) { return; } bar.setProgress(position); TextView text = (TextView) _panelView.findViewById(R.id.text_position); text.setText(TimecodeUtils.format(position)); }