We begin by creating an empty project by the name of AndroidWarehouseMonitor.
- We begin by defining the user interface to display the current temperature and humidity values on the screen. To do this, we define our UI by updating the activity_main.xml file. Remove whatever code is present in this file and you can either add the following code directly to the activity_main.xml file or add the UI via the UI editor:
<?xml version="1.0" encoding="utf-8"?><android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="android.packt.com.androidwarehousemonitor.MainActivity"> ...