I am using Android Studio 1.1 RC 1
.
I've imported an external library into Gradle:
compile 'com.rengwuxian.materialedittext:library:1.8.3'
I've added the namespace tag:
xmlns:app="http://schemas.android.com/apk/res-auto"
into the parent as below:
<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"/>
I get code completion for the custom views within the library i.e.:
<com.rengwuxian.materialedittext.MaterialAutoCompleteTextView />
But nothing comes up when I try code completion for the attributes for this view. I have to type all this in manually.
<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"/>
Is there a setting or import that I'm missing?
Helpful Info: The attribute file in the library can be found here. https://github.com/rengwuxian/MaterialEditText/blob/master/library/src/main/res/values/attrs.xml
I had the same issue. But I have solved it. Go File > Invalidate Caches / Restart... > Click at Invalidate and Restart It's an efficient way. You can try.
Source: Android Studio - Auto complete and other features not working
Note: Here are some other approaches too. Have a look.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With