Java 类org.androidannotations.annotations.CheckedChange 实例源码

项目:MultiItem    文件:AnimationActivity.java   
@CheckedChange({R.id.leftCheck, R.id.rightCheck, R.id.bottomCheck, R.id.scaleCheck, R.id.alphaCheck})
protected void checkedChanged(CompoundButton compoundButton, boolean isChecked) {
    if (!isChecked) {
        return;
    }
    BaseAnimation baseAnimation;
    switch (compoundButton.getId()) {
        case R.id.leftCheck:
            baseAnimation = new SlideInLeftAnimation();
            break;
        case R.id.rightCheck:
            baseAnimation = new SlideInRightAnimation();
            break;
        case R.id.bottomCheck:
            baseAnimation = new SlideInBottomAnimation();
            break;
        case R.id.alphaCheck:
            baseAnimation = new AlphaInAnimation();
            break;
        default:
            baseAnimation = new ScaleInAnimation();
            break;
    }
    //开启动画,并取消动画只在第一次加载时展示
    adapter.enableAnimation(baseAnimation, false);
}
项目:Coding-Android    文件:TopBar.java   
@CheckedChange
void popVoice(boolean checked) {
    if (disableCheckedChange) {
        return;
    }

    if (checked) {
        slowlyPop(false);
    } else {
        if (popEmoji.isChecked()) {
            keyboardControl.showEmojiInput();
        } else {
            keyboardControl.showSystemInput(true);
        }
    }
}
项目:autoamplifier    文件:MainActivity.java   
@CheckedChange(R.id.enable_switch)
void serviceEnabled(CompoundButton button) {
    if (button.isChecked()) {
        if (!isServiceRunning()) {
            AmplifierService_.intent(this).start();
        }
        if(!preferenceProvider.isSavingEnabled()){
            reset();
        }
        currentMicGroup.setVisibility(View.VISIBLE);
    } else {
        AmplifierService_.intent(this).stop();
        currentMicGroup.setVisibility(View.INVISIBLE);
    }

}
项目:https-github.com-hyb1996-NoRootScriptDroid    文件:SideMenuFragment.java   
@CheckedChange(R.id.sw_accessibility_service)
void setAutoOperateServiceEnable(CompoundButton button, boolean enable) {
    boolean isAccessibilityServiceEnabled = AccessibilityServiceTool.isAccessibilityServiceEnabled(App.getApp());
    if (enable && !isAccessibilityServiceEnabled) {
        enableAccessibilityService();
    } else if (!enable && isAccessibilityServiceEnabled) {
        if (!AccessibilityService.disable()) {
            AccessibilityServiceTool.goToAccessibilitySetting();
        }
    }
}
项目:https-github.com-hyb1996-NoRootScriptDroid    文件:SideMenuFragment.java   
@CheckedChange(R.id.sw_floating_window)
void setFloatingWindowEnable(CompoundButton button, boolean enable) {
    if (enable && !HoverMenuManger.isHoverMenuShowing()) {
        HoverMenuManger.showHoverMenu();
        if (Pref.enableAccessibilityServiceByRoot()) {
            enableAccessibilityServiceByRoot();
        }
    } else if (!enable && HoverMenuManger.isHoverMenuShowing()) {
        HoverMenuManger.hideHoverMenu();
    }
}
项目:Auto.js    文件:TimedTaskSettingActivity.java   
@CheckedChange({R.id.daily_task_radio, R.id.weekly_task_radio, R.id.disposable_task_radio})
void onCheckedChanged(CompoundButton button) {
    ExpandableRelativeLayout relativeLayout = findExpandableLayoutOf(button);
    if (button.isChecked()) {
        relativeLayout.post(relativeLayout::expand);
    } else {
        relativeLayout.collapse();
    }

}
项目:Coding-Android    文件:TopBar.java   
@CheckedChange
void popEmoji(boolean checked) {
    if (disableCheckedChange) {
        return;
    }

    if (checked) { // 需要弹出 emoji 键盘
        slowlyPop(true);
    } else {
        keyboardControl.showSystemInput(true);
    }
}
项目:wtshanxun    文件:MainActivity.java   
@CheckedChange({R.id.autoGetPasswordCheckBox, R.id.sendHeartCheckBox})
public void onChecked(CompoundButton view, boolean isChecked) {
    switch (view.getId()) {
        case R.id.autoGetPasswordCheckBox:
            if (isChecked) {
                String c = "该功能会自动发送短信获取密码,请慎重使用!非闪讯电话卡或双卡手机请关闭此功能,否则无法正常使用软件";
                new NoticeDialog(context, "注意", c).show();
            }
            preference.putBoolean(Preference.AUTO_GET_PASSWORD, isChecked);
            break;
        case R.id.sendHeartCheckBox:
            preference.putBoolean(Preference.SEND_HEART, isChecked);
            break;
    }
}
项目:simiasque    文件:MyActivity.java   
@CheckedChange(R.id.switch_view)
protected void checkedChangeOnSwitch(boolean isChecked) {
    // called whenever the switch is touched
    if (isChecked) {
        ViewService_.intent(getApplication()).showMask().start();
    } else {
        ViewService_.intent(getApplication()).hideMask().start();
    }
}
项目:ShoppingMall    文件:ReleasedRentFragment.java   
@CheckedChange(R.id.rent_single_building)
public void buildingCheckChange(CompoundButton buttonView, boolean isChecked) {
    ManyiAnalysis.onEvent(getActivity(), "SingleHoseOnRentPublishClick");
    if (isChecked) {
        mRentBuilding = "0";
        mRentSeatNumber.setVisibility(View.GONE);
    } else {
        mRentBuilding = mRentSeatNumber.getText().toString();
        mRentSeatNumber.setVisibility(View.VISIBLE);
    }
}
项目:ShoppingMall    文件:ReleasedRentFragment.java   
@CheckedChange(R.id.rent_not_unit)
public void unitCheckChange(CompoundButton buttonViews, boolean isChecked) {
    ManyiAnalysis.onEvent(getActivity(), "SingleHoseOnRentPublishClick");
    if (isChecked) {
        mRentUnitNumber = "0";
        mRentUnitNo.setVisibility(View.GONE);
    } else {
        mRentUnitNumber = mRentUnitNo.getText().toString();
        mRentUnitNo.setVisibility(View.VISIBLE);
    }
}
项目:ShoppingMall    文件:ReleasedRentFragment.java   
@CheckedChange(R.id.rent_villa)
public void villaCheckChange(CompoundButton buttonViews, boolean isChecked) {
    ManyiAnalysis.onEvent(getActivity(), "VillaOnRentPublishClick");
    if (isChecked) {
        mRentRoomNumber = "0000";
        mRentRoomNO.setVisibility(View.GONE);
    } else {
        mRentRoomNumber = mRentRoomNO.getText().toString();
        mRentRoomNO.setVisibility(View.VISIBLE);
    }
}
项目:ShoppingMall    文件:ReleasedSellFragment.java   
@CheckedChange(R.id.sell_single_building)
public void buildingCheckChange(CompoundButton buttonView, boolean isChecked) {
    ManyiAnalysis.onEvent(getActivity(), "SingleHoseOnSellPublishClick");

    if (isChecked) {
        mSellBuilding = "0";
        mSellSeatNumber.setVisibility(View.GONE);
    } else {
        mSellBuilding = mSellSeatNumber.getText().toString();
        mSellSeatNumber.setVisibility(View.VISIBLE);
    }
}
项目:ShoppingMall    文件:ReleasedSellFragment.java   
@CheckedChange(R.id.sell_not_unit)
public void sellNotUnit(CompoundButton buttonView, boolean isChecked) {
    ManyiAnalysis.onEvent(getActivity(), "SingleHoseOnSellPublishClick");

    if (isChecked) {
        mSellUnitNumber = "0";
        mUtilNot.setVisibility(View.GONE);
    } else {
        mSellUnitNumber = mUtilNot.getText().toString();
        mUtilNot.setVisibility(View.VISIBLE);
    }
}
项目:ShoppingMall    文件:ReleasedSellFragment.java   
@CheckedChange(R.id.sell_villa)
public void sellVilla(CompoundButton buttonView, boolean isChecked) {
    ManyiAnalysis.onEvent(getActivity(), "VillaOnSellPublishClick");
    if (isChecked) {
        mSellRoomNumber = "0000";
        mSellRoomNO.setVisibility(View.GONE);
    } else {
        mSellRoomNumber = mSellRoomNO.getText().toString();
        mSellRoomNO.setVisibility(View.VISIBLE);
    }
}
项目:Local-GSM-Backend    文件:SettingsFragment.java   
@CheckedChange
protected void openCellId(boolean checked) {
    if (checked && TextUtils.isEmpty(Settings.with(this).openCellIdApiKey())) {
        openCellId.setChecked(false);
        obtainOpenCellIdApiKey();
    } else {
        Settings.with(this).useOpenCellId(checked);
    }
}
项目:Coding-Android    文件:ProjectCreateFragment.java   
@CheckedChange
void generateReadme(boolean checked) {
    projectInfo.gitReadmeEnabled = checked;
}
项目:luxunPro    文件:VideoView.java   
@CheckedChange(R.id.danmaku_switch)
void onDanmakuSwitch(CompoundButton switchBtn, boolean isChecked){
    mDanmakuView.setVisibility(isChecked ? VISIBLE : GONE);
}
项目:Local-GSM-Backend    文件:SettingsFragment.java   
@CheckedChange
protected void mozillaLocationServices(boolean checked) {
    Settings.with(this).useMozillaLocationService(checked);
}
项目:Local-GSM-Backend    文件:SettingsFragment.java   
@CheckedChange
protected void filterRemote(boolean enabled) {
    Settings.with(this).useLacells(enabled);
    updateSourcesVisibility();
}
项目:Local-GSM-Backend    文件:SettingsFragment.java   
@CheckedChange
protected void filterOnPhone(boolean enabled) {
    filterRemote(!enabled);
}
项目:monodict    文件:DictionaryActivity.java   
@CheckedChange(R.id.enable_check_box)
void onCheckedChangeEnableCheckBox(boolean isChecked) {
    Dictionary dictionary = getDictionary();
    dictionary.setEnabled(isChecked);
    dictionaries.updateDictionary(dictionary);
}
项目:moVirt    文件:CertificateManagementActivity.java   
@CheckedChange(R.id.radio_button_default_url)
void defaultUrlChecked(CompoundButton button, boolean isChecked) {
    if (isChecked) {
        presenter.onCertificateLocationChangeAttempt(CertLocation.DEFAULT_URL);
    }
}
项目:moVirt    文件:CertificateManagementActivity.java   
@CheckedChange(R.id.radio_button_custom_url)
void customUrlChecked(CompoundButton button, boolean isChecked) {
    if (isChecked) {
        presenter.onCertificateLocationChangeAttempt(CertLocation.CUSTOM_URL);
    }
}
项目:moVirt    文件:CertificateManagementActivity.java   
@CheckedChange(R.id.radio_button_import_from_file)
void importFromFileChecked(CompoundButton button, boolean isChecked) {
    if (isChecked) {
        presenter.onCertificateLocationChangeAttempt(CertLocation.FILE);
    }
}
项目:selfoss-android    文件:ConfigSyncView.java   
@CheckedChange(R.id.autoSync)
protected void setSyncEnabled(boolean enabled) {
    syncPeriodText.setTextColor(getResources().getColor(enabled ? R.color.main_color : R.color.main_color_disabled));
    syncPeriodText.setEnabled(enabled);
    syncOverWifiCheckBox.setEnabled(enabled);
}