[英]Image in Imageview only androidstudio no in emulator or phone
我對圖像有疑問。
在我在2.2.0上發布androidstudio之后,如果我編輯xml文件,則所有構建的imageview僅在androidstudio中具有圖像。 但如果在genymotion中啟動應用或在手機圖像中啟動apk則無法顯示。
<ImageView
android:layout_height="40sp"
app:srcCompat="@drawable/additem_button"
android:id="@+id/imageView36"
android:layout_weight="1"
android:scaleType="fitXY"
android:layout_width="51sp"
android:layout_gravity="right" />
</FrameLayout>
我具有ldpi,mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi的所有圖像,但是我只啟動xxhdpi手機應用程序,並且沒有新的圖像視圖即可運行....如何解決此問題。
我嘗試這個並運行良好。
<ImageView
android:layout_height="40sp"
android:src="@drawable/additem_button"
android:id="@+id/imageView36"
android:layout_weight="1"
android:scaleType="fitXY"
android:layout_width="51sp"
android:layout_gravity="right" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.