android - Vector are not showing at all after enabling & using Vector Drawable Library -
i trying implement vector drawable library. updated code per below ran new problem. images/vector are not showing @ all.
gradle file
apply plugin: 'com.android.application' android { compilesdkversion 26 buildtoolsversion "26.0.0" defaultconfig { applicationid "com.kanudo.ten" minsdkversion 14 targetsdkversion 26 versioncode 1 versionname "1.0" vectordrawables.usesupportlibrary = true testinstrumentationrunner "android.support.test.runner.androidjunitrunner" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation filetree(dir: 'libs', include: ['*.jar']) androidtestimplementation('com.android.support.test.espresso:espresso-core:3.0.0', { exclude group: 'com.android.support', module: 'support-annotations' }) testimplementation 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:26.0.1' compile 'com.android.support:recyclerview-v7:26.0.1' }
layout file
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"> <imageview android:id="@+id/imageview" app:srccompat="@drawable/ic_note_outlines" android:layout_width="24dp" android:layout_height="24dp" /> </relativelayout>
thanks
there miss...
for working require use <android.support.v7.widget.appcompatimageview>
instead of <imageview>
or/and
one must extend mainactivity
appcompatactivity
instead of activity
Comments
Post a Comment