Designing a User Profile Screen in Android

1 min read

When building a social networking application in Android, there is a need to create and manage user profiles for an effective interaction between different users of your app.
In this article, we will be building a user profile page using the popular LinearLayout in Android. The image below shows the final design screen we will be building. This can be used or modified to meet the requirements of your application profile page when building your next Android application.

user profile design in android


Step 1

Launch the Android Studio IDE and create a new project by selecting the Empty Activity from the list of available template.

Step 2

In order to implement the circular profile ImageView in the above screen, we will be making use of a library, which is a custom view for circular images in Android. You might want to learn more about the library here.

Open the build.gradle file by navigating to app/build.gradle in your current project directory. Add the below code snippet to the list of dependencies and click on ‘Sync‘ in order to update your project dependencies.

Step 3

(a) Firstly, open the colors.xml file and add the below code snippet. You will find it under app/src/main/res/values

(b) Secondly, open the strings.xml file under app/src/main/res/value. Edit the file to match up with the code snippet below.

(c) Thirdly, open up the styles.xml file, modify the file with the below code snippet.

Step 4

Create a new layout XML file under app/src/main/res and name it activity_profile.xml. Copy and paste the below code snippet.

Step 5

We need to create a new Android activity named ProfileActivity. This should be created under the app/src/main/java . Once you have created the file, copy and paste the code snippet below into it.

Step 6

Remember to register the newly created Android activity(ProfileActivity) in your AndroidManifest.xml file, in order to prevent the app from crashing.

Step 7

In the course of our screen layout design, we have made use of some drawable resource files such as the profile image and other icons.
Download the resource files and paste in the drawable folder of your application.

Step 8

Finally, build the project and run on a physical device or an Android emulator.

For further help, use the comment section below or reach out directly to appdevchannel[at]

Related Article: How to Build User Onboarding Screen in Android

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss a tutorial from us, get weekly updates in your inbox.