Page 449 - 3-2
P. 449

hoeDongSong.prepare();
                            } catch (IllegalStateException e) {
                                e.printStackTrace();
                            } catch (IOException e) {
                                e.printStackTrace();
                            }
                            hoeDongSong.seekTo(0);
                            seekbar.setProgress(0);
                        }
                    });


                    music.setOnClickListener(
                            new OnClickListener() {
                                @Override
                                public void onClick(View v) {
                                    if(sound) {
                                        if (hoeDongSong.isPlaying()) {
                                            //  재생중이면 실행될 작업 정지(          )
                                            music.setImageDrawable(getResources().getDrawable(play));
                                            hoeDongSong.stop();
                                            try {
                                                hoeDongSong.prepare();
                                            } catch (IllegalStateException e) {
                                                e.printStackTrace();
                                            } catch (IOException e) {
                                                e.printStackTrace();
                                            }
                                            hoeDongSong.seekTo(hoeDongSong.getCurrentPosition());
                                            seekbar.setProgress(hoeDongSong.getCurrentPosition());
                                        } else {
                                            //  재생중이 아니면 실행될 작업 재생(            )
                                            music.setImageDrawable(getResources().getDrawable(stop));
                                            hoeDongSong.start();
                                            Thread();
                                        }
                                    }
                                }
                            }
                    );


                    button1.setOnClickListener(
                            new OnClickListener() {
                                @Override
                                public void onClick(View v) {
                                    inputText = editText1.getText().toString();


                                                         - 449 -
   444   445   446   447   448   449   450   451   452   453   454