Setting the background for the main Android application

I am currently working on a basic application using eclipse as my IDE. I'm currently having problems setting the image as a background. I followed the tutoral, which told me to place my image in the drawable-mdpi folder and name it as an icon. I tried this, but it continues to fit in the andriod icon, even when I remove the andriod icon icon. Is there a better way to do this?

thanks

+4
source share
1 answer

try the following:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:gravity="center_horizontal" android:background="@drawable/background"></LinearLayout> 

background is a .png file. with borders circle it with Nine9Patch.

Hope this helps

+4
source

Source: https://habr.com/ru/post/1344012/


All Articles