0

The ImageView doesn't seem to be showing for older phones. It shows up fine on my S6 Edge and HTC M9. However when I try it on a S3 or HTC M7 the ImageView doesn't appear.

I tried creating an AVD using a 4.7" screen and versions 5.0.2 but the image is showing up fine on the emulator so I'm not sure what it could be. The reason I went with 4.7" and 5.0.2 is because the S3 and M7 were around those specs.

I've got the image in the drawables folder, with 5 different versions (hdpi, mdpi, xhdpi, xxhdpi & xxxhdpi. My XML is as below:

<ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:src="@drawable/logo"
    android:layout_centerInParent="true"
    android:id="@+id/splashImage"/>

Does anyone have any ideas as to why the ImageView is not appearing on those phones but it is appearing on the emulators with similar specs and newer phones?

Rafiq07
  • 37
  • 1
  • 11

1 Answers1

4

Set following line of code in AndroidManifest.xml file in the Application tag.

                  android:hardwareAccelerated="false"
Patrick R
  • 6,621
  • 1
  • 24
  • 27
  • Thanks, the logo is now appearing as expected! I've got a similar issue which is the colour of the Progress Bar is not changing on older versions of android, could this hardware acceleration also be causing a problem with that as well? – Rafiq07 Dec 28 '16 at 17:29
  • It does not cause any problem in changing colour of the Progress Bar on older versions of android – Patrick R Dec 30 '16 at 05:08