Question

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

What Project have you worked about ?

Okay, so the project was about creating an Tea app, this app consist of add tea, show tea, show a
detail of tea, turn on notification for a random tea per day, Filtering some tea according its filter
information, and also create a timer with custom view

Which part is the hardest? Understand the application flow in the first place, because when I would
like to answer every single part of the question, I need to understand every single class, and debug
which was wrong and which was true, well its truly 80% debugging and understanding the project
and 20% coding

How is the flow of showing random habit using viewPager2 ? First creating the
RandomHabitAdapter and its implementation , when some data is submitted into the adapter, then
its need 2 params that is the pageType and habit information, when that was done then the Adapter
will bind all of the passed information into its binding implementation. In the otherside before all
data can be shown in the randomHabitActivity, the randomHabitActivity Needs to provide its input
for the adapter and initiate the adapter. in the RandomHabitActivity the viewModel will observe The
Habit by its Priority and their page type

Which Components Have been used to show a list of tasks ? A PagedListAdapter Which Inherit the
Adapter<RecyclerView.ViewHolder> So we can use this

adapter to populate the data and the UI for that data that have been passed into the adapter

How Does notification work ? Basically its value is set by the notification option that will be set by
the user, when the user turn it on, the app will create a periodicWorker which require the
NotificationWorker which then the notificationWorker class will take their work, such as, what data
need to be notified, what is the content, how the pending Intent handled. And the information that
will be showed to user came from repository.getRandomTea, which return a random tea. Then we’ll
create the notification Manager, which manage the notification, and then we will create the
notification itself, which consist of the content we would like to show to the user, after that send
notify to the user

Why do we need a view model ? View model is important for modern mobile apps, because it
remove logic from your views thus its encapsulate the data for a UIController to let the data survive
configuration changes. And also why do we need for everysingle activity ? Its make our code much
more cleaner, and sometimes the view model lead us to using MVVM pattern which consists of data
layer domain layer, and presentation layer, the view model itself is to provide the data from the data
layer to presentation layer, which in return we can make our project scalable and not hard to debug.

You might also like