Tencent / Hardcoder

Hardcoder is a solution which allows Android APP and Android System to communicate with each other directly, solving the problem that Android APP could only use system standard API rather than the hardware resource of system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

mortoncui opened this issue · comments

    /**
     * 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");
            }
        }
    });

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