伙计们正试图在使用getCurrentPosition()
播放的音频的特定时刻执行某些操作但当时没有执行。
这是代码:
public class Sound_image_comboActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MediaPlayer player = MediaPlayer.create(this, R.raw.start);
player.start();
while(player.getCurrentPosition()==5671){
setContentView(R.layout.main2);
}
}
}
提前致谢..!