我刚开始使用新的android.support.design库.当使用XML编辑器中的任何小部件时,我停止获取XML自动完成建议!
例如,
<android.support.design.widget.CoordinatorLayout
android:id="@+id/header_root"
android:layout_width="match_parent"
android:layout_height="200dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primary_dark" />
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:src="@drawable/ic_action_add"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="56dp"
app:fabSize="normal"
app:layout_anchor="@id/header_root"
app:layout_anchorGravity="bottom|right|end" />
</android.support.design.widget.CoordinatorLayout>
Run Code Online (Sandbox Code Playgroud)
没有任何标签会显示自动完成弹出窗口,就像我开始输入"android:i"时没有出现弹出窗口,我得到的唯一建议如下图所示.

我已经尝试清理我的项目,重新启动电脑,重新启动Android Studio ..没有任何工作!
我在用Android Studio 1.1 RC 1.
我已经将一个外部库导入Gradle:
compile 'com.rengwuxian.materialedittext:library:1.8.3'
Run Code Online (Sandbox Code Playgroud)
我添加了命名空间标记:
xmlns:app="http://schemas.android.com/apk/res-auto"
Run Code Online (Sandbox Code Playgroud)
进入父母如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primary_light"
android:orientation="vertical"
android:padding="20dp"
tools:context="net.xxx.xxx.ui.activities.Activity"/>
Run Code Online (Sandbox Code Playgroud)
我获得了库中自定义视图的代码完成,即:
<com.rengwuxian.materialedittext.MaterialAutoCompleteTextView />
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试为此视图的属性执行代码完成时,没有任何内容出现.我必须手动输入所有这些.
<com.rengwuxian.materialedittext.MaterialAutoCompleteTextView
android:id="@+id/autocomplete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="3"
android:hint="Enter name"
android:imeOptions="actionDone"
app:floatingLabel="normal"
app:floatingLabelText="Find xxx"/>
Run Code Online (Sandbox Code Playgroud)
我缺少一个设置或导入吗?
有用的信息: 可以在此处找到库中的属性文件. https://github.com/rengwuxian/MaterialEditText/blob/master/library/src/main/res/values/attrs.xml