android.widget.AutoCompleteTextView.setVisibility()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(174)

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

AutoCompleteTextView.setVisibility介绍

暂无

代码示例

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

/**
 * Activates/deactivates all the UI, avoiding to take care of the possible
 * listeners functions if the application is in a non working state.
 *
 * @param enable if true elements will be enabled
 */
private void enableUIElements(boolean enable) {
  int visibility;
  if (enable) {
    setHasOptionsMenu(true);
    visibility = View.VISIBLE;
  } else {
    setHasOptionsMenu(false);
    visibility = View.INVISIBLE;
  }
  mTbStartLocation.setVisibility(visibility);
  mTbEndLocation.setVisibility(visibility);
  mBtnDateDialog.setVisibility(visibility);
  mBtnMyLocation.setVisibility(visibility);
  mNavigationDrawerLeftPane.setVisibility(visibility);
  toggleItinerarySelectionSpinner(enable);
}

代码示例来源:origin: sytolk/TaxiAndroidOpen

@UiThread
void showAddress(String city, String region, String adr) {
  //Log.i(TAG, city + " " + region + " " + adr);
  if (city != null && citiesPicker != null) citiesPicker.setText(city);
  if (region != null && regionsPicker != null) {
    regionsPicker.setText(region);
    regionsPicker.setVisibility(View.VISIBLE);
    //destination.setVisibility(View.GONE);
  } /*else {
    //regionsPicker.setVisibility(View.GONE);
    //destination.setVisibility(View.VISIBLE);
  }*/
  if (addressText != null) {
    if (adr != null && !adr.equals("Unnamed Rd")) {
      addressText.setText(adr);
      // addressText.setVisibility(View.GONE);
    } else { //unknown address
      addressText.setHint(""); //R.string.address);
      //addressText.setVisibility(View.VISIBLE);
    }
  }
}

代码示例来源:origin: zulip/zulip-android

/**
 * Switch from Private to Stream or vice versa in chatBox
 */
private void switchView() {
  if (isCurrentModeStream()) { //Person
    togglePrivateStreamBtn.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_action_bullhorn));
    tempStreamSave = topicActv.getText().toString();
    topicActv.setText(null);
    topicActv.setHint(R.string.hint_person);
    topicActv.setAdapter(emailActvAdapter);
    streamActv.setVisibility(View.GONE);
    textView.setVisibility(View.GONE);
  } else { //Stream
    topicActv.setText(tempStreamSave);
    togglePrivateStreamBtn.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_action_person));
    streamActv.setEnabled(true);
    topicActv.setHint(R.string.hint_subject);
    streamActv.setHint(R.string.hint_stream);
    streamActv.setVisibility(View.VISIBLE);
    textView.setVisibility(View.VISIBLE);
    topicActv.setVisibility(View.VISIBLE);
    streamActv.setAdapter(streamActvAdapter);
    topicActv.setAdapter(subjectActvAdapter);
  }
}

代码示例来源:origin: Coinomi/coinomi-android

public void reset() {
  // No-op if the view is not created
  if (getView() == null) return;
  clearAddress(true);
  hideTxMessage();
  sendToAddressView.setVisibility(View.VISIBLE);
  sendToStaticAddressView.setVisibility(View.GONE);
  amountCalculatorLink.setPrimaryAmount(null);
  sendAmount = null;
  state = State.INPUT;
  addressError.setVisibility(View.GONE);
  amountError.setVisibility(View.GONE);
  amountWarning.setVisibility(View.GONE);
  updateView();
}

代码示例来源:origin: openwalletGH/openwallet-android

public void reset() {
  // No-op if the view is not created
  if (getView() == null) return;
  clearAddress(true);
  hideTxMessage();
  sendToAddressView.setVisibility(View.VISIBLE);
  sendToStaticAddressView.setVisibility(View.GONE);
  amountCalculatorLink.setPrimaryAmount(null);
  sendAmount = null;
  state = State.INPUT;
  addressError.setVisibility(View.GONE);
  amountError.setVisibility(View.GONE);
  amountWarning.setVisibility(View.GONE);
  updateView();
}

代码示例来源:origin: dsolonenko/financisto

public ListBuilder withAutoCompleteFilter(OnClickListener listener, int toggleId) {
  final AutoCompleteTextView autoCompleteTxt = v.findViewById(R.id.autocomplete_filter);
  autoCompleteTxt.setFocusableInTouchMode(true);
  
  ToggleButton toggleBtn = v.findViewById(R.id.filterToggle);
  toggleBtn.setId(toggleId);
  toggleBtn.setOnClickListener(v1 -> {
    listener.onClick(v1);
    boolean filterVisible = toggleBtn.isChecked();
    autoCompleteTxt.setVisibility(filterVisible ? VISIBLE : GONE);
    v.findViewById(R.id.list_node_row).setVisibility(filterVisible ? GONE : VISIBLE);
    if (filterVisible) {
      autoCompleteTxt.setText("");
      Utils.openSoftKeyboard(autoCompleteTxt, layout.getContext());
    } else {
      Utils.closeSoftKeyboard(autoCompleteTxt, layout.getContext());
    }
  });
  return this;
}

代码示例来源:origin: sytolk/TaxiAndroidOpen

regionsPicker.setVisibility(View.VISIBLE);
regionsPicker.setVisibility(View.GONE);

代码示例来源:origin: sytolk/TaxiAndroidOpen

destination.setVisibility(View.VISIBLE);

相关文章

AutoCompleteTextView类方法