Android how to update value of ProgressBar?

后端 未结 4 1705
旧巷少年郎
旧巷少年郎 2021-01-12 01:46

My activity have a ProgressBar. When start activity, I\'ll check value get from another place and update to ProgressBar. Here\'s my code:

final ProgressBar p         


        
4条回答
  •  醉话见心
    2021-01-12 02:15

    Try with:

        int currentPosition=0;
        int total=mediaPlayer.getDuration();
        while(mediaPlayer!=null && currentPosition

    Declare progressEnable globally:

    private boolean progressEnable=true;
    

提交回复
热议问题