I wan't to make background like this welcome screen of nexus in XML. What is the best way to do?
Asked
Active
Viewed 68 times
0

Prathmesh Deshmukh
- 259
- 3
- 14
-
I must admit I know no android at all but seeing "XML" and "background" in the same sentence awakens my curiosity. It looks like "which wing to choose for my car?" – Laurent S. Jul 01 '15 at 18:49
2 Answers
1
You can't set such background with XML, use drawable files instead.

Max77
- 1,466
- 13
- 19
-
You can 'set' the background drawable in xml... you just can't make that background with XML alone. – Nick H Jul 01 '15 at 18:57
1
IMO the only way is to make image file with such background (or any other if you want), copy it to drawables and set background of one of view to it with using
android:background="@drawable/my_fancy_image"
It's probably possible to do it with shapes defined in xml, but I think is not worth trying. It will cost you too much effort.

Sebastian Pakieła
- 2,970
- 1
- 16
- 24