ImageView displaying in layout but not on actual device

前端 未结 9 1827
悲&欢浪女
悲&欢浪女 2020-12-13 12:50

I have an ImageView that I want to display matching the full width of the device, I realized that like this:



        
9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 13:37

    I had the same issue, it is only showing in Design tab for Android Studio 2.2.

    What I did to make it work is to change the automatic key assigned (populated via Drag/Drop ImageView) from app:srcCompat="@drawable/logo" to android:src="@drawable/logo" in Text tab to make it appear on both the emulator and the device e.g

    
    

提交回复
热议问题