GameActivity.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:quidditchtimekeeper 作者:
public void animatePlayPause(View w)
{
    if(game.clocks[game.activeTime].getMode().equals("timer") && !game.clocks[game.activeTime].isRunning() && game.clocks[game.activeTime].getTimeRemaining()==0)
    {
        //nicht starten
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle("You can't start the timer because it is already 00:00.");

        builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {

                dialog.dismiss();

            } });

        AlertDialog alertDialog = builder.create();
        alertDialog.show();
    }
    else
    {
        toggleWatches();
        AnimatedVectorDrawable drawable = play ? playToPause : pauseToPlay;
        playPause[game.activeTime].setImageDrawable(drawable);
        drawable.start();
        play = !play;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号