July 2018
Intermediate to advanced
266 pages
7h 11m
English
The first step is to update the UI so that we have a TextView to display the amount of results. Let's go to activity_search.xml and add the following element searchButton:
<Button android:id="@+id/searchButton" ... /><TextView android:id="@+id/results" app:layout_constraintTop_toBottomOf="@id/searchText" android:layout_width="wrap_content" android:layout_height="wrap_content" /><android.support.v7.widget.RecyclerView ... />
Then, we need to update the RecyclerView so that it appears below the newly created results:
<android.support.v7.widget.RecyclerView android:id="@+id/articles" android:scrollbars="vertical" android:layout_height="wrap_content" android:layout_width="match_parent" app:layout_constraintTop_toBottomOf= ...
Read now
Unlock full access