October 2018
Intermediate to advanced
464 pages
15h 17m
English
We will start by creating a UI with an EditText to enter a phone number and three buttons: Block, Unblock, and isBlocked. To start, open activity_main.xml and follow these steps:
<?xml version="1.0" encoding="utf-8"?><RelativeLayout 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"> <EditText android:id="@+id/editTextNumber" android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputType="phone" android:ems="10" android:layout_alignParentTop= ...