Android: Splash Screen with Kotlin

There are different opinions on whether having a splash screen on your Android application or not.

Personally, I think splash screens are a good place where you can showcase your app’s nice design and give your users a good first impression.

So, this is how I’ve been implementing splash screens on my recent Android apps with Kotlin.

Static vs Animated

I’ve used both static and animated splash screens and here are some thoughts.

Static

  • Showed only in the launching of your app before onCreate() is called.
  • You’re not wasting your users time.
  • Not intended to run operations while the splash screen is shown.

Animated

  • You can show a cool animation and custom design.
  • Flexibility to perform some operations while the animation finishes.
  • Users can get bored if the animation is useless or if it takes too long.

Static Android Splash Screen

one-breath-splash

1.

Create the drawable file that we will use as background in the entry activity, by using a background, the app will show it without having to inflate a layout file.

2.

Create a theme in the styles file with no action bar that uses the splash drawable as the background to set it in the entry activity.

3.

Set the new style as a theme for the splash activity in your app manifest.

4.

Add the code to navigate to the next activity as soon as the app has finished loading.

Animated Android Splash Screen

power-nap-splash

When I use animated splash screens I like to keep showing the static part of the splash screen on the initialization so I repeat steps 1, 2 and 3 from above and just add the animation functionality.

4.

For the animated splash screen, we will inflate a layout with the element or elements we want to animate. In this case, I’m just animating a textview.

5.

Now we need to modify the splash activity to enable the animation and perform some loading operations in the meantime. Here’s how my splash activity looks like.

That’s it, please share your thoughts on Android splash screens and your comments on how to improve this implementation.

Posted in Dev

Ready Player One

People come to the Oasis for all the things they can do, but they stay for all the things they can be.

The question is not if, but when is this going to be a reality. Personally, I think we’re very close in terms of technology, It’s just a matter of time until someone comes up with the right formula.

The idea of a virtual reality of this scale is amazing, scary, but amazing.

car race GIF by Ready Player One

Why Should Every Developer Create a Mobile App

I love to develop mobile apps as a hobby, the first app I published was a very simple RSS client I built in college, It was for Windows Phone 7 and I uploaded it to the Windows Phone Marketplace.

confused girl GIF

I know… My first app ever was destined to die 💀, and not only the first one, because the moment I saw in my dev dashboard that someone besides my mom had downloaded my app I went crazy and eventually I create another 4 apps for Windows Phone before I even get started with Android.

I don’t regret it at all to have put my time and effort into creating these apps. I learned huge when building them and also it took me to the very answer of why I think every developer should create a mobile app:

User Reviews

In one of this apps I got my first user review:

review

Yes, that is my first review ever, and as much as first it made me sad because donna didn’t understand the purpose of my movie suggestions app, I’ve come to realize user reviews are the reason I create mobile apps and here are a few reasons why I find them so valuable.

Impact

User reviews give you a lot of useful information about your app and your users. It is the first indicator that your app is making an impact, either positive or negative in your user’s lives, they’re taking the time to write a review and express their experience while using your app. It feels much better when it’s a good one.

Interaction

With user reviews, you’re able to come close to your users and interact with them. You can offer support, ask follow-up questions or simply say thanks. With this interaction, you build a sense of community around your app.

Improvement

User reviews are about developing better software for your users, paying attention to your user’s needs can impact your app bottom line and enables you to create a better product.

Receiving user reviews feels great, it’s amazing to know that there are people all around the world using your app and that it is making an impact on their lives. Take the improvement opportunity from the bad reviews and the joy and satisfaction of the good ones.

Screenshot_20180417-122509

Why Everyone Should Try Meditation

When I was close to graduate from University I was in a peculiar state of mind. I was overwhelmed by all kinds of troubled thoughts at the time, I was trying to finish my degree smoothly, I was already working and deeply engaged in a software development startup, my love life was a mess, I was moving to a new apartment and as far as I was concerned I was officially an adult.

happy i love you GIF by Rodrigo Tello

That mixture of feelings and thoughts pushed me to look for ways to get some peace of mind. That was how I started learning about meditation and mindfulness and I changed the misconception I had about it:

A mysterious practice that only a few wise ancient people from far away lands did while levitating.

raven GIF

I found a couple of cool apps that helped me to get rid of that idea, I read about the many benefits of meditation, so I thought. Why not, let’s give it a try.

Now I’ve been practicing meditation and mindfulness for a few years and here are a few reasons why I encourage everyone to try meditation.

Reduce Stress

I’ve learned that, as much as you try, you’ll never have control of the situations you find in your life, some of these are pleasant but some are not: Stress is inevitable. Meditation has helped me change my relationship with stress and stressful situations, it allows me to have the space I need to handle stressful moments with clarity and peace.

Relate Better

We live in a web of relationships, from your co-workers to your loved ones and the people you cross with every day. These relationships affect and get affected by your emotions and feelings. When you feel good about yourself, when you’re able to be aware of your emotions and feelings you become less reactive, regulate your moods, increase empathy and kindness and allow others to be, instead of projecting yourself.

Good Night Sleeps

We all know that sleeping is essential for our well being, sleep gets deeply affected by a troubled mind, personally I’ve experienced Insomnia and restless sleep and it affects you mentally and physically. By doing a short meditation before going to bed I’m able to clear my mind, leave trouble thoughts behind and set the conditions for a restful night.

Health

Meditation just makes me feel healthier, It encourages healthier habits and there’s plenty of studies that explore the connection between health and meditation. Reduction of blood pressure, pain relieve, anxiety reduction, memory loss prevention are just some of meditation health benefits.

Live the Moment

Last but not least, by meditating I’ve learned to be present. It’s truly mind-blowing how I’ve found myself doing things completely in automatic mode, meditation has helped me to be aware, about the simplest things, like standing up from my chair or eating my lunch. It sounds cliché but I’ve found great experiences and happiness in the most simple things. Just had to pay attention.

I urge you to give it a try, here’s a couple of apps I like where you can start practicing meditation and mindfulness right away.

Headspace | Stop, Breathe & Think | Calm

And my personal effort to bring a little peace to this world, a simple Android app that helps you recover your natural innate breathing with a simple breathing exercise.

One Breath

Meditate and share your experience!

My Top 10 Android Apps

Recently I got curious about my behavior as a smartphone user, specifically, what are the apps that I use the most on my day to day.

I installed this app, QualityTime, it allows you to monitor and get real time reports on how much time you spend on your smartphone and which are your most used apps. Now I’ve been using it for a while.

So, here are my top 10 Android Apps:

10. WordPress

WordPress for Android puts the power of publishing in your hands, making it easy to create and consume content. Write, edit, and publish posts to your site, check stats, and get inspired with great posts in the Reader. What’s more? It’s open source.

This app become one of my most used apps since I’ve started this blog, it is very useful to be able to manage your site on the go, it helps me to be more consistent with my writing and to don’t miss ideas for blog posts which I can instantly convert to drafts with this app.

9. Wunderlist

Wunderlist helps millions of people around the world capture their ideas, things to do and places to see. Whether you’re sharing a grocery list with a loved one, working on a project, or planning a vacation, Wunderlist makes it easy to share your lists and collaborate with everyone in your life. 

I’ve been using Wunderlist for a long time, I’ve used it to track my homework when I was in college, just as the extract above I’ve used it with my loved one to share our grocery list and places to see (we have plenty), I’ve used it to keep track of my work taks, my personal projects, my learn list, books I want to read, movies I want to watch… It’s not surprising that it is on my top 10 list.

8. Headspace

Get the most out of your day with the Headspace meditation app. We’ll help you perform at your best through the life-changing skills of meditation and mindfulness. In just a few minutes a day, you’ll learn how to train your mind and body for a healthier, happier life.

I use Headspace for my daily meditation, It really helps me with my stress level, keeps me concentrated and I actually really enjoy it, it’s really nice to take 10 minutes and appreciate.

7. Money Lover

Money Lover is the simple way to manage your money, budgets, and bills on your phone. From now on, you’re able to manage all your assets in just one place. How easy it is when getting reports of your expenses, sticking with your budget plans, or tracking your banking transactions!

When I first started working and earning money my financial life became a real mess, I started buying unnecessary stuff, reached the limit of my credit cards and soon I realized I need to manage my finances better or I was going to end up in the streets. I took a short online course about personal finance and started using Money Lover since then to track my expenses and budgets.

6. Google Keep

Quickly capture what’s on your mind and get a reminder later at the right place or time. Speak a voice memo on the go and have it automatically transcribed. Grab a photo of a poster, receipt or document and easily organize or find it later in search. Google Keep makes it easy to capture a thought or list for yourself, and share it with friends and family.

Everyone needs a notes app, this is my favorite one, simple and clean.

5. Fitbit

GET ACTIVE. EAT BETTER. MANAGE WEIGHT. SLEEP BETTER.

My wife recently gave me this Fitbit Charge 2 device, a heart rate and fitness band which I really enjoy, It really helps me to stay active, I love the sleep tracking feature and track my fitness goals. I love the data analytics it gives me, I just try to not get obsessed about it.

4. Instagram

Instagram is a simple way to capture and share the world’s moments. Follow your friends and family to see what they’re up to, and discover accounts from all over the world that are sharing things you love.

My favorite social network, I enjoy looking different realities of people I know as well as people I would like to know.

3. Spotify

With Spotify, you have access to a world of music. You can listen to artists and albums, or create your own playlist of your favorite songs.

I’m a musical person, I need my music with me.

2. YouTube

See what the world is watching — from the hottest music videos to what’s trending in gaming, entertainment, news, and more. Subscribe to channels you love, share with friends, and watch on any device.

I love YouTube I always have videos in my Watch Later playlist, they’re mostly from my subscriptions which contain a wide range of content: space, movies, news, science, travel, TED, formula 1, dev, tech, music, entertainment… I use YouTube app to watchthis videos when I have free time.

1. Tide

Tide lets you get things done by breaking up individual event among discrete intervals, separated by short breaks.

A very simple app I love, it is essentially a timer based on the Pomodoro Technique, a time management method to break down your activities into 25 minutes intervals with short and long breaks. I use it for work, writing, studying, reading, etc. Actually, I think I may be abusing.

Share your top 10 with me!