Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo中打开HardCoder按钮没有实际功能 #9

Closed
mortoncui opened this issue Oct 11, 2019 · 1 comment
Closed

demo中打开HardCoder按钮没有实际功能 #9

mortoncui opened this issue Oct 11, 2019 · 1 comment

Comments

@mortoncui
Copy link

    /**
     * open/close Hardcoder
     */
    hcSwitchBtn = ((Button) findViewById(R.id.hc_switch));
    hcSwitchBtn.setText(hcSwitch ? "Hardcoder state: opened" : "Hardcoder state: closed");
    hcSwitchBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            hcSwitch = hcSwitch ? false : true;
            if(hcSwitch) {
                hcSwitchBtn.setText("Hardcoder state: opened");
            } else {
                hcSwitchBtn.setText("Hardcoder state: closed");
            }
        }
    });
@SophiaGuo
Copy link
Collaborator

hcSwitch 开关控制下面的测试按钮是否打开 Hardcoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants