2016-11-20 205 views
1

我剛剛注意到我的應用的ImageView僅出現在某些設備上。 這是我簡單的ImageView:僅在某些設備上顯示ImageView

.... 
<ImageView 
     android:layout_width="match_parent" 
     app:srcCompat="@drawable/reaction" 
     android:id="@+id/img_react" 
     android:layout_height="100dp" 
     android:layout_gravity="bottom" /> 
..... 

在一些設備中的圖像,則無形.... 應用程序是在Play商店等代碼混淆(我不知道是否可以與對此)。 所有其他ImageView和項目在我的應用程序工作正常,只是這個圖像... 任何人有這個奇怪的錯誤一些想法?

回答

1

app:srcCompat會在棒棒糖之前失敗。

請參閱此: http://android-developers.blogspot.co.il/2016/02/android-support-library-232.html

+0

的問題是與5.0和6.0的設備太 – GMX

+0

你加vectorDrawables.useSupportLibrary =真實的搖籃? –

+0

是的,但我只是解決了調整圖像大小。我不知道爲什麼有些設備甚至是最新的設備無法顯示它,也許是一個屏幕尺寸和資源較少的老人可以....奇怪,但現在似乎是固定的。 – GMX

相關問題