I’m going to share some useful Android Studio shortcuts which help me a lot when I’m writing code. Some of the shortcuts you might know, but some of them I think most of developers don’t even know them… I’m serious because when I knew live templates and postfix completion, I was like… what? I don’t even know they have shortcuts this powerful. Taking advantages of shortcuts can help you write code faster and more efficient. The shortcuts in this post will not only contain general keyboard shortcuts but also live templates and postfix completions. I found these shortcuts really useful from the official intellij docs and an Android Dev Summit 2015 video. So I will share shortcuts in three parts, general shortcuts, live templates, and postfix completions.
Recently, I use Git a lot and it’s really helpful when you are different kind of situation. In my opinion, I think Git is more useful than Subversion because it provides local version control and multiple features to deal with different branches. Let me walk you through how to use Git.
MVP has become really popular in Android development. The reason is that it can help you to split logics from UI and even make your APP testable. For example, “Activity” and “Fragment” in Android sometimes cannot be written in a good way. If you don’t pay attention to activity and fragment, you might create many god objects in Android APP. Then your APP might have bad performance or some serious issues. In MVP, activity and fragment are tend to be views, they only update UI. They don’t deal with model and process data.
Here’s an example of view:
I started to dig into Docker few days ago, and it totally blew my mind. It make building system environments and deploying server a lot more easier than not using it. Since I worked on backend server development few years ago, I spent most of my time on building server environment and deploying server. Also, configuring server sometimes could be extremely painful because there are different kinds of OS you have to deal with. For example, if it’s on Windows, you have to use configuration for Windows. If it’s on Linux, you have to use configuration for Linux. Event you finished writing those scripts, configuration files or property files to make the process, you still have to switch and adjust them if needed. Docker can make those things easier. For now, I only use Docker to build images and run them on container, but I believe I’m gonna use it for more advanced uses.
Before you started to dive into wonderful Docker world, you can check on offical docs to understand what exactly Docker is. It’s easier for you to use it, and it’s very detailed.
Palette is an Android library that you can extract a small set of colors from a Bitmap. I first saw this feature, I thought this is really cool if we can use it dynamically on APP. So that we can build really good looking APP, and this is why I want to write this post.
First step of using this lib, you need to write dependency on your gradle file…
This year, google released data binding library. It’s really interesting to use data binding on Android.
When it comes to improving performance, code execution time becomes really important.
Is there any simple way to get code execution time on Android?
The answer is YES!
I didn’t know this before doing some research online…
All you have to do is just new “TimingLogger”!
I was assigned a product’s updating task, so basically I’m surveying SWT.
Recently, I have to survey ProGuard. We are planning to use ProGuard to protect codes of Android application. As this title, ProGuard can also shrink and optimize APP. So it’s quite useful for Android developers. Android Developers website doesn’t have much information of ProGuard. I suggest everyone go to ProGuard website for more information.