{"id":4783,"date":"2021-01-03T13:36:13","date_gmt":"2021-01-03T03:36:13","guid":{"rendered":"https:\/\/learntodroid.com\/?p=4783"},"modified":"2021-01-03T13:38:18","modified_gmt":"2021-01-03T03:38:18","slug":"how-to-add-a-gradient-background-to-an-android-app","status":"publish","type":"post","link":"http:\/\/10.0.0.14:32769\/how-to-add-a-gradient-background-to-an-android-app\/","title":{"rendered":"How to Add a Gradient Background to an Android App"},"content":{"rendered":"\n
Adding a gradient as a background color to your an Android app can add extra interest and style and provide a great user experience.<\/p>\n\n\n\n
In this post, I will walk you through the steps of how to add a gradient background to your Android app including code samples.<\/p>\n\n\n\n
To add a gradient background to your Android app, you need to do the following.<\/p>\n\n\n\n
In this section of this post, I will go through step by step of how to create a gradient background in Android using a drawable resource.<\/p>\n\n\n\n
First, we will create a new drawable resource we will use for defining the gradient.<\/p>\n\n\n\n
Switch your project in Android Studio into Project mode and navigate into the \/app\/src\/main\/res\/drawable folder. Right click on the “drawable” directory, hover over the “New” item and select the “Drawable Resource File” item.<\/p>\n\n\n\n