CheckBox OnTouchListener、OnCheckedChangeListener和OnClickListener区别

OnTouchListener是在CheckBox点击之前获得的内容,然后执行点击CheckBox之后的内容,执行OnCheckedChangeListener,再是OnClickListener。

非常感谢:http://5200415.blog.51cto.com/3851969/872203  的验证

public class SettingDeviceAudioFragment extends BaseModifyDeviceSettingInfoFragment { private static final String TAG = SettingDeviceAudioFragment.class.getSimpleName(); public static final String EXTRA_DEVICE_MUTE_STATUS = "extra_device_mute_status"; private int mSetMicrophoneVolumeReqID, mSetSpeakerVolumeReqID, mSetAlarmVolumeReqID, mSetMicrophoneMuteReqID, mSetSpeakerMuteReqID; private boolean mIsOnline; private ChannelBean mChannelBean; private boolean mIsSupportMicrophoneVolume; // 是否支持麦克风音量调节 private boolean mIsSupportSpeakerVolume; // 是否支持扬声器音量调节 private boolean mIsSupportAlarmVolume; // 是否支持报警音量调节 private int mMicrophoneVolume; // 麦克风音量 private int mSpeakerVolume; // 扬声器音量 private int mAlarmVolume; // 报警器音量 private View mRootView; private TPSingleLineItemView mMicrophoneMuteItem, mSpeakerMuteItem; private LinearLayout mMicrophoneVolumeLayout, mSpeakerVolumeLayout, mAlarmVolumeLayout; private TextView mMicrophoneVolumePercentTv, mSpeakerVolumePercentTv, mAlarmVolumePercentTv; private Slider mMicrophoneVolumeSeekBar; private Slider mSpeakerVolumeSeekBar; private Slider mAlarmVolumeSeekBar; private int mGetDeviceControlInfoReqID; private boolean mIsSupportMute; private boolean mMuteStatus; private boolean mIsSupportSpeakerMute; private boolean mSpeakerMuteStatus; private TPCheckbox mMuteDialogCheckBox; private boolean mMuteDialogIsChecked = false; // 弹窗是否需再显示 private IPCAppEvent.AppEventHandler mAppEventHandler = new IPCAppEvent.AppEventHandler() { @Override public void onEventMainThread(IPCAppEvent.AppEvent event) { TPLog.d(TAG, event.toString()); updateDeviceBean(); if (mSetMicrophoneVolumeReqID == event.id) { onSetMicrophoneVolumeCallBack(event); } else if (mSetSpeakerVolumeReqID == event.id) { onSetSpeakerVolumeCallBack(event); } else if (mGetDeviceControlInfoReqID == event.id) { onGetDeviceControlInfoCallBack(event); } else if (mSetAlarmVolumeReqID == event.id) { onSetAlarmVolumeCallBack(event); } else if (mSetMicrophoneMuteReqID == event.id) { onSetMicrophoneMuteCallBack(event); } else if (mSetSpeakerMuteReqID == event.id) { onSetSpeakerMuteCallBack(event); } } }; /** * Fragment的生命周期 */ @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mRootView = inflater.inflate(R.layout.fragment_setting_device_audio, container, false); initData(); initView(mRootView); return mRootView; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); sendReqData(); } private void sendReqData() { if (mIsOnline) { mGetDeviceControlInfoReqID = mIPCAppContext.devReqLoadDeviceControlInfo(mDevice.getDeviceID(), mListType, mDevice.getChannelID()); if (mGetDeviceControlInfoReqID <= 0) { showToast(ErrorStringUtil.getErrorMessage(mGetDeviceControlInfoReqID)); } } } private void onGetDeviceControlInfoCallBack(IPCAppEvent.AppEvent event) { if (event.param0 == IPCAppConstants.IPC_EC_OK) { // 更新数据 updateData(); // 更新UI initView(mRootView); } else { showToast(ErrorStringUtil.getErrorMessage(event.param1)); } } @Override public void onDestroy() { super.onDestroy(); mIPCAppContext.unregisterEventListener(mAppEventHandler); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); updateData(); initView(mRootView); } @Override public boolean onBackPressed() { Intent result = new Intent(); result.putExtra(EXTRA_DEVICE_MUTE_STATUS, mMuteStatus); mModifyActivity.setResult(IPCAppActivityCode.ResultCode.RESULT_CODE_SUCCESS, result); mModifyActivity.finish(); return true; } /** * 公共的方法 */ private void initData() { mModifyActivity = (DeviceSettingModifyActivity) getActivity(); mDevice = mModifyActivity.getCurrentDevice(); mListType = mModifyActivity.getCurrentListType(); mIPCAppContext.registerEventListener(mAppEventHandler); updateData(); } private void updateData() { updateDeviceBean(); mIsOnline = mDevice.isOnline(); // 设备类型是NVR,且ChannelID有效 if (mDevice.isNVRAndManagingChannel()) { // 通过NVR管理IPC时,当NVR通道中的IPC均在线,才会显示对应功能入口 mIsOnline = mIsOnline && mChannelBean.isOnline(); } updateVolumeData(); } private void updateDeviceBean() { mDevice = mModifyActivity.updateDevice(); if (mDevice.isNVRAndManagingChannel()) { mChannelBean = mDevice.getChannelBeanByID(mChannelId); } } void updateVolumeData() { if (mDevice.isNVRAndManagingChannel()) { mIsSupportMicrophoneVolume = mChannelBean.isSupportMicrophoneVolume(); mIsSupportSpeakerVolume = mChannelBean.isSupportSpeakerVolume(); mIsSupportAlarmVolume = mChannelBean.isSupportAlarmVolume(); mMicrophoneVolume = mChannelBean.getMicrophoneVolume(); mSpeakerVolume = mChannelBean.getSpeakerVolume(); mAlarmVolume = mChannelBean.getAlarmVolume(); mMuteStatus = mChannelBean.getMuteStatus(); mIsSupportMute = mChannelBean.isSupportMute(); mSpeakerMuteStatus = mChannelBean.getSpeakerMuteStatus(); mIsSupportSpeakerMute = mChannelBean.isSupportSpeakerMute(); } else { mIsSupportMicrophoneVolume = mDevice.isSupportMicrophoneVolume(); mIsSupportSpeakerVolume = mDevice.isSupportSpeakerVolume(); mIsSupportAlarmVolume = mDevice.isSupportAlarmVolume(); mMicrophoneVolume = mDevice.getMicrophoneVolume(); mSpeakerVolume = mDevice.getSpeakerVolume(); mAlarmVolume = mDevice.getAlarmVolume(); mMuteStatus = mDevice.getMuteStatus(); mIsSupportMute = mDevice.isSupportMute(); mSpeakerMuteStatus = mDevice.getSpeakerMuteStatus(); mIsSupportSpeakerMute = mDevice.isSupportSpeakerMute(); } } private void initView(View rootView) { // 麦克风、扬声器音量调节 if (mIsSupportMute){ initMicrophoneMuteIndicator(rootView); } if (mIsSupportMicrophoneVolume) { initMicrophoneVolumeAdjustLayout(rootView); } if (mIsSupportSpeakerMute){ initSpeakerMuteIndicator(rootView); } if (mIsSupportSpeakerVolume) { initSpeakerVolumeAdjustLayout(rootView); } if (mIsSupportAlarmVolume) { initAlarmVolumeAdjustLayout(rootView); } } @Override protected void initTitleBar() { initToolBar(getString(R.string.setting_audio)); if (mToolBar != null) { mToolBar.setNavigationOnClickListener(v -> onBackPressed()); } } private void initMicrophoneMuteIndicator(View rootView){ // 摄影机麦克风是否打开 mMicrophoneMuteItem = rootView.findViewById(R.id.setting_mute_item); updateMicrophoneMuteItemListener(); updateMicrophoneMuteItem(mMuteStatus); mMicrophoneMuteItem.setVisibility(mIsOnline ? View.VISIBLE : View.GONE); } private void updateMicrophoneMuteItem(boolean muteStatus) { mMicrophoneMuteItem.setActionChecked(!muteStatus); // mMuteStatus为true,静音状态 mMicrophoneMuteItem.showDivider(!muteStatus); } private void updateMicrophoneMuteItemListener(){ if (mMuteStatus && !PreferenceUtil.INSTANCE.getMicrophoneTurnOnDialogNotShowAgain(mIPCAppContext.AppConfigGetLatestLoginAccount().getAccountId())) { // 关闭状态 && 没有点击过dont ask,则禁止触发switch开关,因为要弹窗 mMicrophoneMuteItem.setActionClickable(false); mMicrophoneMuteItem.setActionCheckedChangeListener(null); mMicrophoneMuteItem.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mMuteStatus && !PreferenceUtil.INSTANCE.getMicrophoneTurnOnDialogNotShowAgain(mIPCAppContext.AppConfigGetLatestLoginAccount().getAccountId())) { // 关闭状态 && 没有点击不再提示,弹窗 AlertDialog alertDialog = new MaterialAlertDialogBuilder(requireActivity()) .setTitle(getString(R.string.preview_mediaplayer_micphone_open_tips)) .setMessage(getString(R.string.preview_mediaplayer_micphone_open_content)) .setPositiveButton(getString(R.string.common_to_open), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (mMuteDialogIsChecked){ // 点击了不再提示,存入本地,之后不再弹窗提醒 PreferenceUtil.INSTANCE.setMicrophoneTurnOnDialogNotShowAgain(mIPCAppContext.AppConfigGetLatestLoginAccount().getAccountId(), true); } onMicrophoneMuteItemClicked(); } }) .setNegativeButton(getString(R.string.common_cancel), null) .setView(R.layout.dialog_checkbox_layout) .show(); mMuteDialogCheckBox = alertDialog.findViewById(R.id.dialog_tips_checkBox); if (mMuteDialogCheckBox != null) { mMuteDialogCheckBox.setOnUserCheckedChangeListener(new OnUserCheckedChangeListener() { @Override public void onCheckedChanged(@NonNull CompoundButton compoundButton, boolean isChecked, boolean isFromUser) { if (isFromUser) { mMuteDialogIsChecked = isChecked; } } }); } } } }); } else { mMicrophoneMuteItem.setActionClickable(true); mMicrophoneMuteItem.setOnClickListener(null); mMicrophoneMuteItem.setActionCheckedChangeListener(new OnUserCheckedChangeListener() { @Override public void onCheckedChanged(@NonNull CompoundButton button, boolean isChecked, boolean fromUser) { if (fromUser) { mMicrophoneMuteItem.setActionChecked(!isChecked); if (PreferenceUtil.INSTANCE.getMicrophoneTurnOnDialogNotShowAgain(mIPCAppContext.AppConfigGetLatestLoginAccount().getAccountId()) || !mMuteStatus) { onMicrophoneMuteItemClicked(); } } } }); } } private void onMicrophoneMuteItemClicked() { mSetMicrophoneMuteReqID = mIPCAppContext.devReqSetMicrophoneMuteStatus(mDevice.getDeviceID(), !mMuteStatus, mListType, mChannelId); if (mSetMicrophoneMuteReqID > 0) { showLoading(""); } else { updateMicrophoneMuteItem(mMuteStatus); showToast(ErrorStringUtil.getErrorMessage(mSetMicrophoneMuteReqID)); } } private void initSpeakerMuteIndicator(View rootView){ // 摄影机麦克风是否打开 mSpeakerMuteItem = rootView.findViewById(R.id.setting_speaker_mute_item); mSpeakerMuteItem.setActionCheckedChangeListener(new OnUserCheckedChangeListener() { @Override public void onCheckedChanged(@NonNull CompoundButton button, boolean isChecked, boolean fromUser) { if (fromUser) { mSpeakerMuteItem.setActionChecked(!isChecked); onSpeakerMuteItemClicked(); } } }); updateSpeakerMuteItem(); mSpeakerMuteItem.setVisibility(mIsOnline ? View.VISIBLE : View.GONE); } private void updateSpeakerMuteItem() { mSpeakerMuteItem.setActionChecked(!mSpeakerMuteStatus); // mMuteStatus为true,静音状态 mSpeakerMuteItem.showDivider(!mSpeakerMuteStatus); } private void onSpeakerMuteItemClicked() { mSetSpeakerMuteReqID = mIPCAppContext.devReqSetSpeakerMuteStatus(mDevice.getDeviceID(), !mSpeakerMuteStatus, mListType, mChannelId); if (mSetSpeakerMuteReqID > 0) { showLoading(""); } else { updateSpeakerMuteItem(); showToast(ErrorStringUtil.getErrorMessage(mSetSpeakerMuteReqID)); } } private void onSetSpeakerMuteCallBack(IPCAppEvent.AppEvent event) { dismissLoading(); if (event.param0 == IPCAppConstants.IPC_EC_OK) { mSpeakerMuteStatus = !mSpeakerMuteStatus; updateSpeakerMuteItem(); TPViewUtils.setVisibility(mSpeakerMuteStatus || !mIsSupportSpeakerVolume ? View.GONE : View.VISIBLE, mSpeakerVolumeLayout); TPViewUtils.setVisibility(mSpeakerMuteStatus || !mIsSupportAlarmVolume ? View.GONE : View.VISIBLE, mAlarmVolumeLayout); updateSpeakerVolumeView(mSpeakerVolume); updateAlarmVolumeView(mAlarmVolume); } else { showToast(ErrorStringUtil.getErrorMessage(event.param1)); } } private void initMicrophoneVolumeView(final View rootView) { mMicrophoneVolumeSeekBar.addOnChangeListener(new Slider.OnChangeListener() { @Override public void onValueChange(@NonNull Slider slider, float value, boolean fromUser) { int progress = (int)value; mMicrophoneVolumePercentTv.setText(String.valueOf(progress).concat("%")); } }); mMicrophoneVolumeSeekBar.addOnSliderTouchListener(new Slider.OnSliderTouchListener(){ @Override public void onStartTrackingTouch(@NonNull Slider slider) {} @Override public void onStopTrackingTouch(@NonNull Slider slider) { int progress = (int)mMicrophoneVolumeSeekBar.getValue(); reqSetMicrophoneVolume(progress); } }); // 禁止音量条拖动时手指有竖直方向上的位移时外层scroll view拦截音量条的滑动事件 mMicrophoneVolumeSeekBar.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { ((NestedScrollView) rootView.findViewById(R.id.setting_device_control_scroll_view)) .requestDisallowInterceptTouchEvent(true); return false; } }); } private void initMicrophoneVolumeAdjustLayout(final View rootView) { mMicrophoneVolumeLayout = rootView.findViewById(R.id.setting_microphone_volume_layout); mMicrophoneVolumePercentTv = rootView.findViewById(R.id.setting_microphone_volume_percent_tv); mMicrophoneVolumeSeekBar = rootView.findViewById(R.id.setting_microphone_volume_seekbar); initMicrophoneVolumeView(rootView); // 支持音量调节且设备在线时,仅支持静音且静音时不显示音量调节 if (mIsSupportMicrophoneVolume && mIsOnline && (!(mIsSupportMute && mMuteStatus))) { TPViewUtils.setVisibility(View.VISIBLE, mMicrophoneVolumeLayout); updateMicrophoneVolumeView(mMicrophoneVolume); } else { TPViewUtils.setVisibility(View.GONE, mMicrophoneVolumeLayout); } } private void updateMicrophoneVolumeView(final int volume) { mMicrophoneVolumeSeekBar.post(new Runnable() { @Override public void run() { mMicrophoneVolumeSeekBar.setValue(volume); } }); mMicrophoneVolumePercentTv.setText(String.valueOf(volume).concat("%")); } private void reqSetMicrophoneVolume(int volume) { if (mMicrophoneVolume == volume) return; mSetMicrophoneVolumeReqID = mIPCAppContext.devReqSetMicrophoneVolume(mDevice.getDeviceID(), volume, mChannelId, mListType); if (mSetMicrophoneVolumeReqID > 0) { showLoading(""); } else { updateMicrophoneVolumeView(mMicrophoneVolume); showToast(ErrorStringUtil.getErrorMessage(mSetMicrophoneVolumeReqID)); } } private void onSetMicrophoneVolumeCallBack(IPCAppEvent.AppEvent event) { dismissLoading(); if (event.param0 == IPCAppConstants.IPC_EC_OK) { updateVolumeData(); updateMicrophoneVolumeView(mMicrophoneVolume); } else { updateMicrophoneVolumeView(mMicrophoneVolume); showToast(ErrorStringUtil.getErrorMessage(event.param1)); } } private void initSpeakerVolumeAdjustLayout(final View rootView) { mSpeakerVolumeLayout = rootView.findViewById(R.id.setting_speaker_volume_layout); mSpeakerVolumePercentTv = rootView.findViewById(R.id.setting_speaker_volume_percent_tv); mSpeakerVolumeSeekBar = rootView.findViewById(R.id.setting_speaker_volume_seekbar); if (mIsSupportSpeakerVolume && mIsOnline && (!(mIsSupportSpeakerMute && mSpeakerMuteStatus))) { TPViewUtils.setVisibility(View.VISIBLE, mSpeakerVolumeLayout); } else { TPViewUtils.setVisibility(View.GONE, mSpeakerVolumeLayout); } updateSpeakerVolumeView(mSpeakerVolume); mSpeakerVolumeSeekBar.addOnChangeListener(new Slider.OnChangeListener() { @Override public void onValueChange(@NonNull Slider slider, float value, boolean fromUser) { int progress = (int)value; mSpeakerVolumePercentTv.setText(String.valueOf(progress).concat("%")); } }); mSpeakerVolumeSeekBar.addOnSliderTouchListener(new Slider.OnSliderTouchListener(){ @Override public void onStartTrackingTouch(@NonNull Slider slider) {} @Override public void onStopTrackingTouch(@NonNull Slider slider) { int progress = (int)mSpeakerVolumeSeekBar.getValue(); reqSetSpeakerVolume(progress); } }); // 禁止音量条拖动时手指有竖直方向上的位移时外层scroll view拦截音量条的滑动事件 mSpeakerVolumeSeekBar.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { ((NestedScrollView) rootView.findViewById(R.id.setting_device_control_scroll_view)) .requestDisallowInterceptTouchEvent(true); return false; } }); } private void initAlarmVolumeAdjustLayout(final View rootView) { mAlarmVolumeLayout = rootView.findViewById(R.id.setting_alarm_volume_layout); mAlarmVolumePercentTv = rootView.findViewById(R.id.setting_alarm_volume_percent_tv); mAlarmVolumeSeekBar = rootView.findViewById(R.id.setting_alarm_volume_seekbar); if (mIsSupportAlarmVolume && mIsOnline && (!(mIsSupportSpeakerMute && mSpeakerMuteStatus))) { TPViewUtils.setVisibility(View.VISIBLE, mAlarmVolumeLayout); } else { TPViewUtils.setVisibility(View.GONE, mAlarmVolumeLayout); } updateAlarmVolumeView(mAlarmVolume); mAlarmVolumeSeekBar.addOnChangeListener(new Slider.OnChangeListener() { @Override public void onValueChange(@NonNull Slider slider, float value, boolean fromUser) { int progress = (int)value; mAlarmVolumePercentTv.setText(String.valueOf(progress).concat("%")); } }); mAlarmVolumeSeekBar.addOnSliderTouchListener(new Slider.OnSliderTouchListener(){ @Override public void onStartTrackingTouch(@NonNull Slider slider) {} @Override public void onStopTrackingTouch(@NonNull Slider slider) { int progress = (int)mAlarmVolumeSeekBar.getValue(); reqSetAlarmVolume(progress); } }); // 禁止音量条拖动时手指有竖直方向上的位移时外层scroll view拦截音量条的滑动事件 mAlarmVolumeSeekBar.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { ((NestedScrollView) rootView.findViewById(R.id.setting_device_control_scroll_view)) .requestDisallowInterceptTouchEvent(true); return false; } }); } private void updateSpeakerVolumeView(final int volume) { mSpeakerVolumeSeekBar.post(new Runnable() { @Override public void run() { mSpeakerVolumeSeekBar.setValue(volume); } }); mSpeakerVolumePercentTv.setText(String.valueOf(volume).concat("%")); } private void updateAlarmVolumeView(final int volume) { mAlarmVolumeSeekBar.post(new Runnable() { @Override public void run() { mAlarmVolumeSeekBar.setValue(volume); } }); mAlarmVolumePercentTv.setText(String.valueOf(volume).concat("%")); } private void reqSetSpeakerVolume(int volume) { mSetSpeakerVolumeReqID = mIPCAppContext.devReqSetSpeakerVolume(mDevice.getDeviceID(), volume, mChannelId, mListType); if (mSetSpeakerVolumeReqID > 0) { showLoading(""); } else { updateSpeakerVolumeView(mSpeakerVolume); showToast(ErrorStringUtil.getErrorMessage(mSetSpeakerVolumeReqID)); } } private void reqSetAlarmVolume(int volume) { mSetAlarmVolumeReqID = mIPCAppContext.devReqSetAlarmVolume(mDevice.getDeviceID(), volume, mChannelId, mListType); if (mSetAlarmVolumeReqID > 0) { showLoading(""); } else { updateAlarmVolumeView(mAlarmVolume); showToast(ErrorStringUtil.getErrorMessage(mSetAlarmVolumeReqID)); } } private void onSetSpeakerVolumeCallBack(IPCAppEvent.AppEvent event) { dismissLoading(); if (event.param0 == IPCAppConstants.IPC_EC_OK) { updateVolumeData(); updateSpeakerVolumeView(mSpeakerVolume); } else { showToast(ErrorStringUtil.getErrorMessage(event.param1)); } } private void onSetAlarmVolumeCallBack(IPCAppEvent.AppEvent event) { dismissLoading(); if (event.param0 == IPCAppConstants.IPC_EC_OK) { updateVolumeData(); updateAlarmVolumeView(mAlarmVolume); } else { showToast(ErrorStringUtil.getErrorMessage(event.param1)); } } private void onSetMicrophoneMuteCallBack(IPCAppEvent.AppEvent event) { dismissLoading(); if (event.param0 == IPCAppConstants.IPC_EC_OK) { mMuteStatus = !mMuteStatus; updateMicrophoneMuteItem(mMuteStatus); updateMicrophoneMuteItemListener(); TPViewUtils.setVisibility(mMuteStatus ? View.GONE : View.VISIBLE, mMicrophoneVolumeLayout); updateMicrophoneVolumeView(mMicrophoneVolume); } else { showToast(ErrorStringUtil.getErrorMessage(event.param1)); } } } 使用Mermaid画出原来的UI页面的类图
最新发布
12-11
```mermaid classDiagram class SettingDeviceAudioFragment { -TAG: String +EXTRA_DEVICE_MUTE_STATUS: String -mSetMicrophoneVolumeReqID: int -mSetSpeakerVolumeReqID: int -mSetAlarmVolumeReqID: int -mSetMicrophoneMuteReqID: int -mSetSpeakerMuteReqID: int -mIsOnline: boolean -mChannelBean: ChannelBean -mIsSupportMicrophoneVolume: boolean -mIsSupportSpeakerVolume: boolean -mIsSupportAlarmVolume: boolean -mMicrophoneVolume: int -mSpeakerVolume: int -mAlarmVolume: int -mRootView: View -mMicrophoneMuteItem: TPSingleLineItemView -mSpeakerMuteItem: TPSingleLineItemView -mMicrophoneVolumeLayout: LinearLayout -mSpeakerVolumeLayout: LinearLayout -mAlarmVolumeLayout: LinearLayout -mMicrophoneVolumePercentTv: TextView -mSpeakerVolumePercentTv: TextView -mAlarmVolumePercentTv: TextView -mMicrophoneVolumeSeekBar: Slider -mSpeakerVolumeSeekBar: Slider -mAlarmVolumeSeekBar: Slider -mGetDeviceControlInfoReqID: int -mIsSupportMute: boolean -mMuteStatus: boolean -mIsSupportSpeakerMute: boolean -mSpeakerMuteStatus: boolean -mMuteDialogCheckBox: TPCheckbox -mMuteDialogIsChecked: boolean -mAppEventHandler: IPCAppEvent.AppEventHandler +onCreateView(LayoutInflater, ViewGroup, Bundle): View +onViewCreated(View, Bundle) +onDestroy() +onActivityResult(int, int, Intent) +onBackPressed(): boolean -initData() -updateData() -updateDeviceBean() -updateVolumeData() -initView(View) -initTitleBar() -initMicrophoneMuteIndicator(View) -updateMicrophoneMuteItem(boolean) -updateMicrophoneMuteItemListener() -onMicrophoneMuteItemClicked() -initSpeakerMuteIndicator(View) -updateSpeakerMuteItem() -onSpeakerMuteItemClicked() -onSetSpeakerMuteCallBack(IPCAppEvent.AppEvent) -initMicrophoneVolumeView(View) -initMicrophoneVolumeAdjustLayout(View) -updateMicrophoneVolumeView(int) -reqSetMicrophoneVolume(int) -onSetMicrophoneVolumeCallBack(IPCAppEvent.AppEvent) -initSpeakerVolumeAdjustLayout(View) -initAlarmVolumeAdjustLayout(View) -updateSpeakerVolumeView(int) -updateAlarmVolumeView(int) -reqSetSpeakerVolume(int) -reqSetAlarmVolume(int) -onSetSpeakerVolumeCallBack(IPCAppEvent.AppEvent) -onSetAlarmVolumeCallBack(IPCAppEvent.AppEvent) -onSetMicrophoneMuteCallBack(IPCAppEvent.AppEvent) } class IPCAppEvent { +AppEventHandler } class IPCAppConstants { +IPC_EC_OK } class ErrorStringUtil { +getErrorMessage(int): String } class PreferenceUtil { +INSTANCE: PreferenceUtil +getMicrophoneTurnOnDialogNotShowAgain(String): boolean +setMicrophoneTurnOnDialogNotShowAgain(String, boolean) } class TPViewUtils { +setVisibility(int, View) } class TPSingleLineItemView { +setActionChecked(boolean) +showDivider(boolean) +setActionClickable(boolean) +setActionCheckedChangeListener(OnUserCheckedChangeListener) +setOnClickListener(View.OnClickListener) } class Slider { +addOnChangeListener(OnChangeListener) +addOnSliderTouchListener(OnSliderTouchListener) +setOnTouchListener(View.OnTouchListener) +setValue(float) +getValue(): float } class OnUserCheckedChangeListener { <<interface>> +onCheckedChanged(CompoundButton, boolean, boolean) } class CompoundButton { +setChecked(boolean) +isChecked(): boolean } class View { +VISIBLE: int +GONE: int +findViewById(int): View +setVisibility(int) } class TextView { +setText(String) } class LinearLayout { +setVisibility(int) } class AlertDialog { +findViewById(int): View } class MaterialAlertDialogBuilder { +setTitle(String): MaterialAlertDialogBuilder +setMessage(String): MaterialAlertDialogBuilder +setPositiveButton(String, DialogInterface.OnClickListener): MaterialAlertDialogBuilder +setNegativeButton(String, DialogInterface.OnClickListener): MaterialAlertDialogBuilder +setView(int): MaterialAlertDialogBuilder +show(): AlertDialog } class DialogInterface { <<interface>> } class NestedScrollView { +requestDisallowInterceptTouchEvent(boolean) } class MotionEvent { +getAction(): int } SettingDeviceAudioFragment --> IPCAppEvent : uses SettingDeviceAudioFragment --> IPCAppConstants : uses SettingDeviceAudioFragment --> ErrorStringUtil : uses SettingDeviceAudioFragment --> PreferenceUtil : uses SettingDeviceAudioFragment --> TPViewUtils : uses SettingDeviceAudioFragment --> TPSingleLineItemView : uses SettingDeviceAudioFragment --> Slider : uses SettingDeviceAudioFragment --> OnUserCheckedChangeListener : implements SettingDeviceAudioFragment --> CompoundButton : uses SettingDeviceAudioFragment --> View : uses SettingDeviceAudioFragment --> TextView : uses SettingDeviceAudioFragment --> LinearLayout : uses SettingDeviceAudioFragment --> AlertDialog : uses SettingDeviceAudioFragment --> MaterialAlertDialogBuilder : uses SettingDeviceAudioFragment --> DialogInterface : uses SettingDeviceAudioFragment --> NestedScrollView : uses SettingDeviceAudioFragment --> MotionEvent : uses ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值