In the previous section, we understood the frontend of an HTML page that would translate input for us. In this section, we will build the frontend of an Android app that leverages the endpoint we generated for the function to return the translated text for us.
We create the layout of the app as follows:
<?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=".MainActivity"> <Button android:id="@+id/button" android:layout_width="wrap_content" ...