This problem does not occur in regular layout XML files, but it does occur in PreferenceScreen xml files. Is this expected behavior? When I define a custom view and add it to a PreferenceScreen directly it's XML file, that custom view has no auto-complete or refactoring capabilities for its attributes.
To clarify what I mean by custom Preferences: I use this method to implement custom Preferences.
So let's go by the example in that link. What I want to do is have all the benefits of auto-complete (e.g. IntelliSense). Suppose I want to create a custom SeekBar that I defined/created, but instead of typing manually the package name and class name, I press CTRL+SPACE to bring up the auto-complete list. But it doesn't show up!
Suppose I want this to be my final PreferenceScreen xml:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<com.example.SeekbarPreference
android:key="pref_volume"
android:title="@string/volume" />
</PreferenceScreen>
I want to CTRL+SPACE to autocomplete my custom Preference:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<com.ex
</PreferenceScreen>
But it doesn't work! It does work for Custom Views under normal layout files that are inflated by Activities. But if it's a PreferenceScreen, I have to type that all out but I am prone to make errors.
Furthermore, I want to refactor my resources that the custom Preference's attributes reference. Suppose I go into my "strings.xml" resources file and change "@string/volume" to "@string/volume_label"
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<com.example.SeekbarPreference
android:key="pref_volume"
android:title="@string/volume" />
</PreferenceScreen>
When I am in my "strings.xml" file, if I right click and refactor "volume" to "volume_label", these resources are renamed in the entire projects including in layout xml files and java class files. However, the "@string/volume" in the PreferenceScreen's file stays unchanged. And when I compile and install the app I get an error from Android Studio that the String resource called "volume" does not exist.
If I am in my PreferenceScreen's XML file, if I right click on: android:title="@string/volume", the refactor > rename button is missing.