How do I add a background image and icon to my app in eclipse? And an exit button that closes app?
Asked
Active
Viewed 1,870 times
0
-
Read this, then reconsider: http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon – EboMike Feb 11 '11 at 18:31
-
1As to the first part: images and icons are basics, and while not difficult, you are in effect asking for a tutorial. Search on 'Android activity layout background image tutorial eclipse' or such. – DJC Feb 11 '11 at 18:46
-
I tried what u suggested what i find is vague and doent work or i cant get it to work. Need specifics – bigmos Feb 11 '11 at 19:44
1 Answers
0
For adding a background on your view simply add in the layout xml file
android:background="#000000" or android:background="@drawable/yourdrawable"
where yourdrawable is your image in the drawable folder in your project.
The icon of your app can be changed by replacing the icon.png in the drawable folder or by changing the android:icon="@drawable/yourdrawable
in the AndroidManifest.xml
For more about icons in Android check this site.
About adding an exit button in you app you should definitely read this first then think about it.