热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

本文整理了Java中android.widget.AutoCompleteTextView.setFocusableInTouchMode()方法的一些代码示例,展示了

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

AutoCompleteTextView.setFocusableInTouchMode介绍

暂无

代码示例

代码示例来源:origin: posm/OpenMapKitAndroid

@Override
public void onClick(View view) {
if (editTextCheckBox.isChecked()) {
editText.setFocusableInTouchMode(true);
editText.requestFocus();
final InputMethodManager inputMethodManager = (InputMethodManager) activity
.getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
}
}
});

代码示例来源:origin: posm/OpenMapKitAndroid

@Override
public void onClick(View view) {
if (customButton.isChecked()) {
customEditText.setFocusableInTouchMode(true);
customEditText.requestFocus();
final InputMethodManager inputMethodManager = (InputMethodManager) activity
.getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.showSoftInput(customEditText, InputMethodManager.SHOW_IMPLICIT);
}
}
});

代码示例来源:origin: TongmingWu/Manga

@Override
public boolean onTouch(View v, MotionEvent event) {
etSearch.setFocusable(true);
etSearch.setFocusableInTouchMode(true);
etSearch.requestFocus();
String word = etSearch.getText().toString().trim();
editHint(word);
return false;
}
});

代码示例来源:origin: q805699513/OptionFrame

public void setContentView(View contentView) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
contentView.setLayoutParams(layoutParams);
if (contentView instanceof ListView) {
setListViewHeightBasedOnChildren((ListView) contentView);
}
LinearLayout linearLayout = (LinearLayout) mAlertDialogWindow.findViewById(
R.id.message_content_view);
if (linearLayout != null) {
linearLayout.removeAllViews();
linearLayout.addView(contentView);
}
for (int i = 0; i <(linearLayout != null ? linearLayout.getChildCount() : 0); i++) {
if (linearLayout.getChildAt(i) instanceof AutoCompleteTextView) {
AutoCompleteTextView autoCompleteTextView
= (AutoCompleteTextView) linearLayout.getChildAt(i);
autoCompleteTextView.setFocusable(true);
autoCompleteTextView.requestFocus();
autoCompleteTextView.setFocusableInTouchMode(true);
}
}
}

代码示例来源:origin: szpnygo/NoWordsChat

public void setContentView(View contentView) {
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
contentView.setLayoutParams(layoutParams);
if (contentView instanceof ListView) {
setListViewHeightBasedOnChildren((ListView) contentView);
}
LinearLayout linearLayout = (LinearLayout) mAlertDialogWindow.findViewById(R.id.message_content_view);
if (linearLayout != null) {
linearLayout.removeAllViews();
linearLayout.addView(contentView);
}
for (int i = 0; i if (linearLayout.getChildAt(i) instanceof AutoCompleteTextView) {
AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView) linearLayout.getChildAt(i);
autoCompleteTextView.setFocusable(true);
autoCompleteTextView.requestFocus();
autoCompleteTextView.setFocusableInTouchMode(true);
}
}
}

代码示例来源:origin: szpnygo/NoWordsChat

autoCompleteTextView.setFocusable(true);
autoCompleteTextView.requestFocus();
autoCompleteTextView.setFocusableInTouchMode(true);

代码示例来源:origin: q805699513/OptionFrame

autoCompleteTextView.setFocusable(true);
autoCompleteTextView.requestFocus();
autoCompleteTextView.setFocusableInTouchMode(true);

代码示例来源: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;
}

推荐阅读
author-avatar
小熊2502872357
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有