循环内设置标志判断 循环却终止了 求解

在搞一个局域网式物联网 上位机与下位机之间的通讯 想用一个按钮去停止另一个按钮的命令循环 看下面代码

  protected static boolean bloopflag = false;//设置的全局变量
    public void juhuiCmdButton(View view) {//一个按钮事件
        new Thread(new Runnable() {

            @Override
            public void run() {  
                for (int i=0;i<99;i++) {
                    bloopflag = false;
        if(currDevice != null){
            ZigbeeAssistant.setDeviceState(currDevice, true);
            ZigbeeAssistant.setDeviceColour(currDevice,0xFFFF4433);
            }
        try {
            Thread.currentThread();
            Thread.sleep(2000);//阻断2秒
            } catch (InterruptedException e) {
            e.printStackTrace();
            }
        if(bloopflag = true){
            break;
        }
        if(currDevice != null){
            ZigbeeAssistant.setDeviceState(currDevice, true);
            ZigbeeAssistant.setDeviceColour(currDevice,0xFF123456);
            }
        try {
            Thread.currentThread();
            Thread.sleep(2000);//阻断2秒
            } catch (InterruptedException e) {
            e.printStackTrace();
            }
        if(bloopflag = true){
            break;
        }
        if(currDevice != null){
            ZigbeeAssistant.setDeviceState(currDevice, true);
            ZigbeeAssistant.setDeviceColour(currDevice,0xFFFFFF11);
            }
        try {
            Thread.currentThread();
            Thread.sleep(2000);//阻断2秒
            } catch (InterruptedException e) {
            e.printStackTrace();
            }
        if(bloopflag = true){
            break;
        }
         }

                bloopflag = false;  
            }

        }).start();

    }
        public void stopCmdButton(View view)throws Exception{//另一个按钮事件

        bloopflag = true;

    }

循环从一开始就断掉了