The XML file(matrix_cell.xml) being inflated.
<EditText
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/rect_edit_text"
android:textCursorDrawable="@drawable/cursor_black"
android:textColor="@color/colorAccent"
android:gravity="center_horizontal"
android:inputType="number"
android:layout_margin="1dp"
android:layout_weight="1" />
The code inflating the view:
LayoutInflater inflater = LayoutInflater.from(this);
TableRow tableRow = new TableRow(this);
inflater.inflate(R.layout.matrix_cell, tableRow, true);
The EditText View created is not selectable, the input focus remains on the previous input being focus when the EditText View is clicked.