Android Studio 2.2 Preview is included with the new layout system and design editor. By using drag-and-drop features, constraint layout automatically adds constraints to your views. The new editor also has design and blueprint view.
In Object-Oriented Programming (OOP) we spend most of our time creating objects or instances of classes. We usually prefer constructors when we create these objects. However, increasing the number of fields leads us to think differently because of the exponential and unnecessary complexity of the constructors. Builder pattern, on the other hand, overcomes this issue by using a builder to create an object in a step by step manner.
I want to share with you my new tool which lets you to convert iOS String resources Localizable.strings to Android String resources strings.xml and vice-versa.
What it does;
It is a smarttool and it will make your job easier. If you are a cross platform developer then you can benefit from this tool. It will ease the process of converting string resources from one platform to another.
We as android developers spend our time mostly on the IDE itself. Android Studio is the one of the most intelligent IDEs out there. Mainly because it is built on top of the most intelligent IDE, Intellij Idea.
Today at Android Dev Summit 2015, Android Studio 2.0 Preview edition is announced and available on the canary channel, therefore we can use the bleeding edge features of the newly released Android Studio 2.0 features right away without waiting to be released in stable channel.
There are some ways to instantiate and pass data to fragments in android development. However, you must be careful when you do that and you should avoid the wrong approaches while you are instantiating and passing data to fragments.
The most recommended way of instantiate fragments with arguments is to have factory methods for this task.
Also, another important topic is about how to pass data to the fragments while instantiating them. In this case it is tempting to directly access the fields of your fragment and assign their values. However, this is the wrong approach. Because when your application send back to background and the other applications require more and more memory then your application and its resources will be cleared from the memory to open up space to the new ones.
While developing your awesome application, sometimes you are required to add a feature to change the language of your app on the fly. However, Android OS does not directly support this behaviour. And therefore, you need to solve this situation in some other ways.
Android by default uses the locale of the device to select the appropriate language dependent resources. And most of the time this behaviour is enough for common applications.
However, sometimes there is some business requirements that you need to implement. To do that I will outline the details of changing the language of your application programmatically on the fly.
Here is the appropriate way of changing the locale of the application:
There are some difficulties which you have to overcome to change the language programmatically.
Your application will not remember your language change after it is closed or recreated during the configuration change.
You should update currently visible UI properly according to the selected language.