Привет, будет полезно, если вы загрузите сюда свой XML-файл.
В общем случае «Объявление атрибутов» будет отображать только те атрибуты, которые вы объявили в XML-файле.
В примере:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
tools:layout_editor_absoluteX="135dp"
tools:layout_editor_absoluteY="389dp" />
</android.support.constraint.ConstraintLayout>
для этого XML-файла вы получите только этот «Объявление атрибутов» А теперь, если вы добавите:
android:onClick="doSomthing"
вкнопка
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"
tools:layout_editor_absoluteX="135dp"
tools:layout_editor_absoluteY="389dp"
android:onClick="doSomthing"
/>
Теперь вы увидите атрибут «onClick» в «Объявление атрибутов»
, как это
Вы можете прокрутить вниз до «Все атрибуты» и просмотреть их все. или просто напишите нужный вам атрибут в xml-файле, как я это сделал.
надеюсь, это поможет