android.widget.Spinner.setEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(181)

本文整理了Java中android.widget.Spinner.setEnabled()方法的一些代码示例,展示了Spinner.setEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spinner.setEnabled()方法的具体详情如下:
包路径:android.widget.Spinner
类名称:Spinner
方法名:setEnabled

Spinner.setEnabled介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

private void toggleWidgets(boolean enable) {
 type.setEnabled(enable);
 period.setEnabled(enable);
 download.setEnabled(enable);
}

代码示例来源:origin: commonsguy/cw-omnibus

private void toggleWidgets(boolean enable) {
 type.setEnabled(enable);
 period.setEnabled(enable);
 download.setEnabled(enable);
}

代码示例来源:origin: daniulive/SmarterStreaming

private void ConfigControlEnable(boolean isEnable) {
  btnRecorderMgr.setEnabled(isEnable);
  videoEncodeTypeSelector.setEnabled(isEnable);
  btnBitrateControl.setEnabled(isEnable);
  btnNoiseSuppression.setEnabled(isEnable);
  btnAGC.setEnabled(isEnable);
  btnSpeex.setEnabled(isEnable);
  btnInputPushUrl.setEnabled(isEnable);
}

代码示例来源:origin: daniulive/SmarterStreaming

screenResolutionSelector.setEnabled(false);
recorderSelector.setEnabled(false);
btnRecorderMgr.setEnabled(false);
videoEncodeTypeSelector.setEnabled(false);
stopService(intent_bgd_service);
btnRtspPublisher.setText("发布RTSP流");
screenResolutionSelector.setEnabled(true);
btnPermissionCheck.setEnabled(true);
recorderSelector.setEnabled(true);
btnRecorderMgr.setEnabled(true);
videoEncodeTypeSelector.setEnabled(true);

代码示例来源:origin: daniulive/SmarterStreaming

screenResolutionSelector.setEnabled(false);
recorderSelector.setEnabled(false);
btnRecorderMgr.setEnabled(false);
btnInputPushUrl.setEnabled(false);
videoEncodeTypeSelector.setEnabled(false);
stopService(intent_bgd_service);
btnPublisher.setText("开始RTMP推送");
screenResolutionSelector.setEnabled(true);
btnPermissionCheck.setEnabled(true);
recorderSelector.setEnabled(true);
btnRecorderMgr.setEnabled(true);
btnInputPushUrl.setEnabled(true);
videoEncodeTypeSelector.setEnabled(true);

代码示例来源:origin: daniulive/SmarterStreaming

cameraResolutionSelector.setEnabled(false);
recorderSelector.setEnabled(false);
btnRecorderMgr.setEnabled(false);
btnInputPushUrl.setEnabled(false);
is_running = false;
btnPublisher.setText("开始推流");
cameraResolutionSelector.setEnabled(true);
btnSwitchCamera.setEnabled(true);
recorderSelector.setEnabled(true);
btnRecorderMgr.setEnabled(true);
btnInputPushUrl.setEnabled(true);

代码示例来源:origin: ankidroid/Anki-Android

findViewById(R.id.CardEditorTagButton).setEnabled(false);
mNoteDeckSpinner.setEnabled(false);
int position = mAllDeckIds.indexOf(mCurrentEditedCard.getDid());
if (position != -1) {
findViewById(R.id.CardEditorTagButton).setEnabled(true);
mNoteDeckSpinner.setEnabled(true);

代码示例来源:origin: daniulive/SmarterStreaming

btnPushStartStop.setText(" 开始推流 ");
btnPushRecoderMgr.setEnabled(true);
videoEncodeTypeSelector.setEnabled(true);
  videoEncodeTypeSelector.setEnabled(false);

代码示例来源:origin: serso/android-checkout

private void updateTargetSkusVisibility() {
  final boolean enabled = mTargetSkusAdapter.getCount() > 0 && mPurchasedSkusAdapter.getChecked().size() > 0;
  mChange.setEnabled(enabled);
  mTargetSkus.setEnabled(enabled);
}

代码示例来源:origin: fossasia/pslab-android

llChannel3.setVisibility(View.GONE);
  llChannel4.setVisibility(View.GONE);
  channelSelectSpinner1.setEnabled(true);
  break;
case 1:
  llChannel3.setVisibility(View.GONE);
  llChannel4.setVisibility(View.GONE);
  channelSelectSpinner1.setEnabled(true);
  channelSelectSpinner2.setEnabled(true);
  break;
case 2:
  channelSelectSpinner2.setSelection(1);
  channelSelectSpinner3.setSelection(2);
  channelSelectSpinner1.setEnabled(false);
  channelSelectSpinner2.setEnabled(false);
  channelSelectSpinner3.setEnabled(false);
  break;
case 3:
  channelSelectSpinner3.setSelection(2);
  channelSelectSpinner4.setSelection(3);
  channelSelectSpinner1.setEnabled(false);
  channelSelectSpinner2.setEnabled(false);
  channelSelectSpinner3.setEnabled(false);
  channelSelectSpinner4.setEnabled(false);
  break;
default:

代码示例来源:origin: chrisk44/Hijacker

utilSpinner.setEnabled(false);

代码示例来源:origin: fossasia/pslab-android

case 0:
  ((OscilloscopeActivity) getActivity()).setLeftYAxisLabel(spinnerChannelSelect.getSelectedItem().toString());
  spinnerRangeCh1.setEnabled(true);
  break;
case 1:
  ((OscilloscopeActivity) getActivity()).setLeftYAxisScale(16, -16);
  ((OscilloscopeActivity) getActivity()).setLeftYAxisLabel(spinnerChannelSelect.getSelectedItem().toString());
  spinnerRangeCh1.setEnabled(false);
  break;
case 2:
  ((OscilloscopeActivity) getActivity()).setLeftYAxisScale(3, -3);
  ((OscilloscopeActivity) getActivity()).setLeftYAxisLabel(spinnerChannelSelect.getSelectedItem().toString());
  spinnerRangeCh1.setEnabled(false);
  break;
case 3:
  ((OscilloscopeActivity) getActivity()).setLeftYAxisScale(3, 0);
  ((OscilloscopeActivity) getActivity()).setLeftYAxisLabel(spinnerChannelSelect.getSelectedItem().toString());
  spinnerRangeCh1.setEnabled(false);
  break;
case 5:
  ((OscilloscopeActivity) getActivity()).setLeftYAxisScale(3, 0);
  ((OscilloscopeActivity) getActivity()).setLeftYAxisLabel(spinnerChannelSelect.getSelectedItem().toString());
  spinnerRangeCh1.setEnabled(false);
  break;
case 6:
  ((OscilloscopeActivity) getActivity()).setLeftYAxisScale(3, 0);
  ((OscilloscopeActivity) getActivity()).setLeftYAxisLabel(spinnerChannelSelect.getSelectedItem().toString());
  spinnerRangeCh1.setEnabled(false);

代码示例来源:origin: antest1/kcanotify

public void setSpinnerEnable(Spinner sp, boolean b) {
  if (sp != null) {
    sp.setEnabled(b);
  }
}

代码示例来源:origin: offensive-security/nethunter-app

@Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    if (isChecked) {
      command_exec_mode.setSelection(0);
      command_exec_mode.setEnabled(false);
    } else {
      command_exec_mode.setEnabled(true);
    }
  }
});

代码示例来源:origin: limboemu/limbo

private void enableRemovableDiskValues(boolean flag) {
  mCD.setEnabled(flag && mCDenable.isChecked());
  mFDA.setEnabled(flag && mFDAenable.isChecked());
  mFDB.setEnabled(flag && mFDBenable.isChecked());
  mSD.setEnabled(flag && mSDenable.isChecked());
}

代码示例来源:origin: vogellacompany/codeexamples-android

@Override
public void onSuccess(List<GithubRepo> value) {
  if (!value.isEmpty()) {
    ArrayAdapter<GithubRepo> spinnerAdapter = new ArrayAdapter<>(MainActivity.this, android.R.layout.simple_spinner_dropdown_item, value);
    repositoriesSpinner.setAdapter(spinnerAdapter);
    repositoriesSpinner.setEnabled(true);
  } else {
    ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(MainActivity.this, android.R.layout.simple_spinner_dropdown_item, new String[]{"User has no repositories"});
    repositoriesSpinner.setAdapter(spinnerAdapter);
    repositoriesSpinner.setEnabled(false);
  }
}

代码示例来源:origin: demantz/RFAnalyzer

@Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    et_bandwidth.setEnabled(isChecked);
    sp_bandwidthUnit.setEnabled(isChecked);
  }
});

代码示例来源:origin: demantz/RFAnalyzer

@Override
  public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    et_stopAfter.setEnabled(isChecked);
    sp_stopAfter.setEnabled(isChecked);
  }
});

代码示例来源:origin: lessthanoptimal/BoofAndroidDemo

protected void deactiveControls() {
  runOnUiThread(() -> {
    guiEnabled = false;
    spinnerClassifier.setEnabled(false);
  });
}

代码示例来源:origin: AmazMod/AmazMod

public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
    //WatchfaceActivity.this.send_data = isChecked;
    Prefs.putBoolean(Constants.PREF_WATCHFACE_SEND_DATA, isChecked);
    //Toast.makeText(WatchfaceActivity.this, "send data: " + isChecked, Toast.LENGTH_SHORT).show();
    WatchfaceActivity.this.send_watchface_data_interval.setEnabled(isChecked);
    WatchfaceActivity.this.send_on_battery_change_switch.setEnabled(isChecked);
    WatchfaceActivity.this.send_on_alarm_change_switch.setEnabled(isChecked);
    WatchfaceActivity.this.watchface_sync_now_button.setEnabled(isChecked);
  }
});

相关文章