--ADVERTISEMENT--

Welcome screen is used to show basic information of application, how to use the app, what is inside app/game, etc. In this tutorial, you will learn to display welcome page or screen with some text/message to the users. Welcome screen is shown only one time when users open the application/game first time after installation.

Every android application may not display welcome screen/message to the users. We can see many popular applications showing some message before continuing to use. Displaying welcome message is not difficult task in android. For this just use RelativeLayout and add little bit code in java activity file.

Related:
Android Material Design Login Form XML UI Design
How to Make/Create a Splash Screen in Android
Capture Image from Android Camera and Display it Programmatically

Android Example: How to Display Welcome Screen/Message in Android


Let’s start by editing our XML layout file. First add a RelativeLayout as root layout and add another RelativeLayout inside it to show welcome message. All the content inside second RelativeLayout is for welcome screen. After that add relative layout or linear layout layout below second relative layout which is for app home screen content.

Following is the complete content of XML layout file to show welcome message to the user.

res/layout/welcome_message_android.xml

Now, we have to add little bit code in our java activity file to dismiss the welcome message when user click Got It button and show content of app. Following is the complete code of Java activity file.

src/ WelcomeMessageAndroid.java

Android Example: How to Display Welcome Screen/Message in Android

That’s all. Now, run your Displaying Welcome Screen/Message in Android application, you will see welcome screen with message and Got It button. If you click the Got It button then the welcome message will be invisible.

Post a Comment

Powered by Blogger.