How to loop sound in android

后端 未结 2 591
旧时难觅i
旧时难觅i 2021-01-06 09:05

When press button first sound active. Then press that button again it will stop and second sound active My code is OK?

package com.Randomsentence;
    impor         


        
2条回答
  •  孤城傲影
    2021-01-06 09:36

    Add the line:

    mp.setLooping(true);
    

    Then set false when you want to stop it looping.

提交回复
热议问题