V
V
Vadim2016-04-21 22:20:41
Java
Vadim, 2016-04-21 22:20:41

How to remove gray background image in android?

I set an image as a background:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/main_background" >

But for some reason, on some devices it does not display it as such, but returns a gray background. Why does this happen and how is it treated?
P. S I tried to change formats (jpg, png), but nothing changed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kanesy, 2016-04-21
@kanesy

Try to check by setting some color instead of drawable. Check the resources - maybe a different drawable is set for certain versions. In most cases, the system works correctly, and an oversight on the part of the developer)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question