-3
В моем приложении я использую com.android.support:design:25.0.0
получить FloatingActionButton
но когда-либо я установить значок для негоНевозможно решить Drawable fab_icon андроида
app:fab_icon="@drawable/ic_done"
Я получаю сообщение об ошибке
Cannot Resolve symbol @drawable/ic_done
I пробовали другие значки, но никто из них не работает?
XML:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_cust"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_nxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
app:fab_icon="@drawable/ic_done"
/>
</android.support.design.widget.CoordinatorLayout>
Gradle Dependecies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.getbase:floatingactionbutton:1.10.1'
testCompile 'junit:junit:4.12'
}
Edit:
Ive также попытался заменить fab_icon с андроид: СРК, но ни один из его работы.
Вы можете оставить свой XML-код – sasikumar
изменение 'com.android.support: дизайн: 25.0.0' в' com.android.support: дизайн: 24.2.1' и попробовать его –
@sasikumar я ве обновлен вопрос с XML. на самом деле его нельзя получить с конкретными именами. Если я не ошибаюсь, они предоставляются библиотекой поддержки дизайна. но не могут получить к ним доступ. –