Posts

Showing posts with the label imageview

Android - ImageView blank (xml only)

Android - ImageView blank (xml only) I am having a weird issue on my new project, I just cant display an image on my activity. The ImageView shows a blank square. screenshot If I try with a black background and a picture with transparency, I can see the picture that appears in white even if it is supposed to be colored. But if I try with a multi colored picture with no transparency, it just shows a blank square. I tried on emulator and phone with the exact same result. I checked all the related posts on Stackoverflow without any working solution. My src : I added a small picture in res/drawable/test2.png Here is my (very basic) activity code / activity_main.xml: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colorPrimaryDark"> <ImageView android:layout_width=...