Implementing a Splash Screen, the wiser way

Implementing a Splash Screen, the wiser way

What is a Splash Screen?

A Splash Screen is basically a nice intro-screen that mobile applications have on startup of the app on a device. The splash screen can be customized according to the app’s UX need-animations, sound effects, etc. are some common tweaks to a simple splash screen.

I have been working with FOSSASIA on the Neurolab Android App where we made a splash screen for the same. Our implemented splash screen is below:

                                                     Neurolab Splash Screen

While developing this, we followed Google Material Design guidelines and the pattern it suggests is termed as ‘Launch Screen’. Displaying a launch screen can decrease the sense of long load time, and has the potential to add delight to the user experience. Launch screen implementation is considered as one of the best-practised development skills for a proper splash screen for an app.

Implementation 

Now, it is not a good idea to use a splash screen that wastes a user’s time. This should be strictly avoided. The right way of implementing a splash screen is a little different. In the new approach specify your splash screen’s background as the activity’s theme background. This way, we can effectively and efficiently use the time gap between the startup of the app and the onCreate() method.

In the Neurolab app, we use the splash screen as a bridge for the time gap between the app startup when we click the app icon and the onCreate method of the Neurolab Activity (Main/Launcher Screen) of the app, wherein the various UI components are laid out on the screen and the functionalities, navigations, listeners are linked to those components.

So, here we won’t be creating a new layout for the Splash screen as a separate activity. Rather we would specify the theme of the landing activity as the splash screen.

We create a drawable named splash_screen.xml in our project and give a parent tag of layer-list. Here is the code for our drawable file:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:opacity="opaque">
    <item android:drawable="@android:color/white" />
    <item>
        <bitmap
            android:gravity="center_horizontal"
            android:src="@drawable/splash_image" />
    </item>
</layer-list>

Next, we are going to create a new theme in the styles resource file. This theme is going to be used as the base theme for the main activity screen of the app. In this style, we specify our created drawable file to the property name windowBackground.

<style name="AppTheme.Launcher">
        <item name="android:windowBackground">@drawable/splash_screen</item>
</style>

Then, update this style in the project manifest file to set the theme of the main activity

android:theme="@style/AppTheme.Launcher"

Having done the steps so far, we create a simple class extending the AppCompatActivity. Note- This may seem like another Activity screen, but it is not. We don’t specify the setContentView() here. Instead of this class just directs to the main/home activity using an Intent. Finally, be sure to finish() the SplashActivity activity (class) to remove prevailing unused/idle activities from back stack.

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Start landing activity screen
startActivity(new Intent(SplashActivity.this, MainActivity.class));
finish();
}

We are done!!

Launch your app, and observe your Launch screen. I can promise you that your “time won’t be wasted”(pun intended).

Thanks for reading. Hope this adds value to your Android application development skills. 

References:

Tags: FOSSASIA. Neurolab, GSOC19, Open-source, splash-screen, Android

Continue ReadingImplementing a Splash Screen, the wiser way

Introducing Design, Art & Culture Track of FOSSASIA 2017

This year at FOSSASIA under a new “Design, Art & Culture” track we aim to unite designers, artists and developers in FOSS. The goal of this track to showcase design/art/culture projects done within open source communities and in open source way, as well as strengthen the connections between designers and FOSS community.


Picture by Hong Phuc FOSSASIA

Possible topics may include, but not limited to:
     Design (Graphic, UX)
     * FOSS Design Tools
     * Design Techniques
     * Design – Engineering Collaboration Approaches
     * Project Case Studies
     Art
     * Art projects with open source license
     * Art & Open Source
    Culture
    * Culture of Open Source
    * Open Source beyond software

FASSASIA is a biggest open source community and a conference in Asia, so it will be a great chance for attendees to expand the community in the region.
New design track in particular is an opportunity to spread the word among developers regarding how and where to get design help for their projects.  
Another chance that this track provides is a help for non-code contributors to find their place in FOSS communities.

Volunteers from Open Source Design Community will promote several initiatives, like presenting successful projects and having a “jobs board” where FOSS projects looking for design contributors can connect with available designers.
If you want to help – join preparations for the track here.

Dates & Deadlines
Please send us your proposal as soon as possible via the FOSSASIA
Submission Link: 2017.fossasia.org/speaker-registration

December 20th, 2016: Deadline for submissions
January 18th, 2017: Notification of acceptance
March 17th – 19th, 2017: FOSSASIA OpenTechSummit

Continue ReadingIntroducing Design, Art & Culture Track of FOSSASIA 2017

Open Design Weeks 2011 Saigon

The Open Design Weeks Asia take place in Hochi Minh City and Cantho (Vietnam) from April 2-16, 2011. The program has been announced. There will be an Open Design Camp in Saigon and intensive workshops in Cantho.

The focus of the Open Design Weeks are on design, Free, Libre and Open Source software, open content and Free Culture practices. Events during the design weeks include workshops, design camps to share expertise an unconference, company meet ups to establish international cooperations, presentations in Universities and training workshops. The intensive workshops with local designers, software developers and typographers focus on collaborative font design, mapping and publication.

This will be a great chance to get involved in some new and exciting projects

Open Design Weeks: http://opendesign.asia

Continue ReadingOpen Design Weeks 2011 Saigon