Author: Gunhan Sancar
-
MVVM Architecture with Kotlin and Flows
The Model-View-ViewModel (MVVM) architecture is a powerful pattern used in Android development to separate responsibilities and enhance code maintainability. With the integration of Kotlin Flow, managing data streams becomes seamless and efficient. Model In MVVM, the Model represents the data layer and can include data models and services. View The View, which includes Activities and…
-
What is new in Android – Google IO 2016 – Quick Notes
1. Constraint Layout 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.
-
Ease Communication Between Activities, Fragments, and Services
Ease communication between Activities, Fragments, Dialogs, Services, AsyncTaks, and Life Cycles of Anything by using event bus in Android. Event bus is an implementation of publish/subscribe pattern which is a messaging system between a subscriber and a publisher. A subscriber waits for an event to be dispatched from a publisher. In this article I will describe…
-
Builder Pattern
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…
-
Bottom Sheets in Android
Bottom Sheets A bottom sheet is a sheet that slides up from the bottom edge of the screen. Bottom sheets are displayed as a result of user triggered action, and also it can reveal additional content by swiping up. A bottom sheet can be a structural part of your page and also it can be…
-
String Resource Converter
Hello fellow developers, 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 smart tool and it will make your job easier. If you are a cross platform developer then you can benefit from…
-
How to Change APK File Name in Android
Today, I want to share with you some valuable file naming scripts for gradle to change your artifact output file names. Gradle is a build system which lets you to produce both android archives(.aar) and android packages(.apk) easily. In android studio the gradle build settings will produce a very boring standart artifact name for you like output files…
-
Best Practice to Instantiate Fragments with Arguments in Android
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…
-
Change Language Programmatically in Android
Update: Published locale-helper as a library which can be found at https://github.com/zeugma-solutions/locale-helper-android 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…