SPLASH SCREEN AND PERMISSION IN ANDROID
Splash screen is the screen that appears for few seconds when the application is launched.
It may also display startup progress or branding.It appears before main activity and is the launching activity.
STEPS TO CODE SPLASH SCREEN-
STEP 3. After making a new project in android studio, create second activity i.e splash activity. Those who don't know how to make a project ,kindly visit the link below.
https://developer.android.com/studio/projects/create-project
Code for xml file -
STEP 4.
STEP 5.
STEP 6. i.
Import all these packages and if any error occurs at some code than hit alt+enter.
ii.
iii.
STEP 7.
These are changes to be made in Android.manifest file.You can ask for any permission like read or write storage,etc.
STEP 8. Code for splash screen is done. The screenshot below is of main activity.You can perform any operation that you want here.I have simply printed a text.
STEP 9. Now run your app and you will see the final result as follow -
Hey guys, do try the following code for splash screen and for asking permission.
Thank You...😊
Comments
Post a Comment