We can use a different projection and the same observer pattern for displaying some KPIs. Actually that is pretty easy, as we will see in this recipe.
For this recipe, you need to have completed the previous one successfully.
We will continue working on the app from the previous recipe and we will add a new view to display the KPIs:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:gravity="center_horizontal" android:padding="16dp" android:layout_height="match_parent"> ...