开发者

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();
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜