Android Sound keeps replaying
I have an ImageView and I would like it to play a sound as you hold the button, so that the sounds loops continually until开发者_Go百科 the user lets go.
I currently have the following code:
ImageView sound1 = (ImageView) findViewById(R.id.horn1);
sound1.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view)
{
horn1.start();
}
});
精彩评论