android 智能提示

<AutoCompleteTextView
android:id="@+id/autoCompleteTextView"
android:completionThreshold="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入"
/>

private String[] resourcesStrings = {"beijing1","beijing2","beijing3"};

//单个

autoCompleteTextView = (AutoCompleteTextView) findViewById(R.id.autoCompleteTextView);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, resourcesStrings);
autoCompleteTextView.setAdapter(adapter);

//多个

multiAutoCompleteTextView = (MultiAutoCompleteTextView)findViewById(R.id.t2);
multiAutoCompleteTextView.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
multiAutoCompleteTextView.setAdapter(adapter);

时间: 2024-08-12 18:22:01

android 智能提示的相关文章

eclipse的android智能提示设置

eclipse的android智能提示设置 分类: android 技术2011-12-07 23:13 3069人阅读 评论(0) 收藏 举报 eclipseandroidtriggersjavafileimport 以往 我们往往在输入 "." 然后 alt+/ 来进行智能提示,下面这个方法,可以帮你大幅度的提高智能打开 Eclipse -> Window -> Perferences(首选项),会打开个Perferences 的设置界面. 找到Java 下的 Edit

[转]eclipse的android智能提示设置

以往 我们往往在输入 "." 然后 alt+/ 来进行智能提示,下面这个方法,可以帮你大幅度的提高智能打开 Eclipse -> Window -> Perferences(首选项),会打开个Perferences 的设置界面. 找到Java 下的 Editor(编辑器) 下的 Content Assist(内容辅助) , 右边出现的选项中,有一个Auto activation triggers for Java:(java的自动激活触发器) 会看到只有一个".&

vs2015 android axml智能提示

Visual Studio中的Android 智能提示需要两个XML模式文件才能正常工作. 要找到这些文件,请转到此文件夹: C:\ Program Files(x86)\ Xamarin Studio \ AddIns \ MonoDevelop.MonoDroid \ schemas * 在以上Xamarin Studio安装目录以下两个.xsd文件: android-layout-xml.xsdschemas.android.com.apk.res.android.xsd 然后把这两个文件

Eclipse for android 实现代码自动提示智能提示功能

Eclipse for android 实现代码自动提示智能提示功能,介绍 Eclipse for android 编辑器中实现两种主要文件 java 与 xml 代码自动提示功能,解决 eclipse 代码提示失效.eclipse 不能自动提示.eclipse 没有代码提示的问题. 1.设置 java 文件的代码提示功能 打开 Eclipse 依次选择Window > Preferences > Java > Editor - Content Assist > Auto acti

Xamarin开发Android时Visual Studio 2012没有智能提示解决办法

Most of the people who work with Xamarin’s Mono for Android in Visual Studio 2012 face a bug where Intellisense doesn’t work for AXML in source view. One of the fix which worked for me is mentioned below. Launch Visual Studio 2012 Open a solution wit

Android Studio帮助文档的安装及智能提示设置

初次使用Android Studio,发现其智能提示不能像Visual Studio一样显示系统方法等的详细用途描述.经查找资料,问题原因是未安装SDK Document. 解决办法如下: 1.打开如下菜单(图一): (图一) 2.在下图二中选中Documentation for android SDK,确定后即可自动下载文档 3.下载后,可能此时仍无法弹出方法详述,这时要打开 jdk.table.xml,文件路径 /$USER_HOME$\.AndroidStudio2.3\config\op

Android开发中Eclipse里的智能提示设置

今天开始学习一下Android开发,直接在Android Developers下载的一个开发工具包,然后再下了一个JDK,配置完环境变量等一系列的工作后环境就搭建好了,在新建好第一个Android项目 后,唉?写代码没有智能提示?对于用惯了VS的.NET开发者来说,简直不能接受啊,肯定哪里有设置对不对! 百度了一下,设置如下:1.java文件中智能提示打 开Eclipse 依次选择 Window > Preferences > Java > Editor - Content Assist

Xamarin.Android之布局文件智能提示问题

Xamarin.Android之布局文件智能提示问题 一.前言 看到有人问关于xamarin.android的布局没智能提示问题(VS 2015),当然,写布局这东西没提示这是一件相对痛苦的事 ,所以这里就提供一个解决的方案! 二.解决方案 想要智能提示,肯定也是要有相应的文件的!!! 第一步.把这两个文件放在  VS安装目录\Xml\Schemas   这个文件夹下面 第二步.在VS中把这两个用起来 打开工具栏的XML->Schemas 通过添加按钮把那两个文件添加进去(按理说,只需要添加那个

VS 2015 update2 装xamarin后,编辑axml文件无智能提示的解决方法。

1.从github网上下载xsd文件.地址:https://github.com/atsushieno/monodroid-schema-gen: 2.如果你是以ie或edge浏览器下载的,一定要又键这个压缩包,看属性,如图,如果有红框内的属性,一定要选上解锁,否则vs因安全性无法打开从这个解压出来的文件.3.解压这个压缩包.从中拷贝两个文件 android-layout-xml.xsd,schemas.android.com.apk.res.android.xsd 到vs的安装目录下C:\Pr