Posts on Android label.
Posted on 27th Nov 2017 05:13:50 in Android, Design
In the previous MVVM-part1 we learnt about the data binding, how we can set data binding in android, which attributes can be bounded, and how do we can create auto-updating layouts.
In this part of the article series of MVVM we would learn how the MVVM model interact with its different components.
Posted on 27th Nov 2017 04:48:40 in Android, Design
Model-View-Presenter (MVP) architecture is widely used in today’s Android apps to separate the view from the presentation logic and the model by introducing a presenter. Model-View-ViewModel (MVVM) is quite similar to MVP, with the view model acting as an enhanced presenter, using a data binder to keep the view model and the view in sync. By binding the view to view model properties, the data binder can handle view updates without the need to manually set changed data back to the view (e.g. no more setText()
or setVisibility()
on a TextView). As with the presenter in MVP, the view model can easily be unit tested. This article gives an introduction to both the data binding library and the MVVM architectural pattern and how they work together on Android.
Posted on 29th Oct 2017 20:32:16 in Design, Android
Model View Presenter(MVP) is similar to other structural patterns for implementing separation of concerns, such as Model-View-Controller and Model-View-ViewModel. In MVP on Android, your activities and fragments typically act as the view objects by implementing a view interface, and handle interaction of the app with the user.
The view passes on user actions to the presenter, which handles the business logic and interaction with data repositories, such as a server API or database. The model layer consists of the objects that make up the content of the app.
Posted on 29th Oct 2017 02:10:17 in Java, Android
This is the part 4 of the article series. In part 3 we learnt what a Component
is, how it wires with the Module.
We also implemented the DemoApplication Activity lifecycle & the respective layout.
In this article we would learn how DaggerApplicationComponent
generates the DAG(Directed Acyclic Graph) when we provide the ApplicationModule
class to it. Further, we would learn how @inject
is used to get the object instance to finish our learning about Dagger2. Let's get started!
Posted on 29th Oct 2017 01:33:20 in Java, Android
This is the part 3 of the article series. In part 2 we implemented the DataManager
, DbHelper
, SharedPrefsHelper
and we modeled the class so that we can retrieve the value from the database.
We will learn next what is a Component
, how we can create a Component
& how it wire itself in the DemoApplication to generate the dependent acyclic grap of objects.
Posted on 29th Oct 2017 01:14:37 in Java, Android
Using Dependency Injection in Android.
This is the part 2 of the article series. In part 1 we understood the need and advantages of dependency injection. We also got an overview of Dagger2. In this part, we will focus on implementing the DI using Dagger2 in an android app.For the sake of this tutorial, we will break the process in steps and analyze each step one by one. Remember Dagger2 requires a concentrated approach. So actively follow the below tutorial, asking a lot of questions.
Posted on 20th Aug 2017 15:05:21 in Android
Every day we use various applications and despite of their diverse intentions, most of them are very similar or even resemble each other in terms of design. That’s why a lot of customers are requesting specific, customized layouts and appearances that no other application has embodied yet, in order to make the Android application unique and contrast from others.
If a specific feature requires a very customized functionality that could not be created by android built-in views — then here comes custom view drawing. What that means in most cases, is that it will take quite a while to complete it. But it does mean that we should not do this, moreover it’s very exciting and interesting to implement.
"Don’t grieve. Anything you lose comes round in another form."
-Rumi
"Let the beauty we love be what we do."
-Rumi