Design UI using table layout to display buttons with 0 9 numbers on it. Even display submit and clear button. When user clicks on particular buttons and later when clicks on submit button, it should display the numbers clicked. (Note: Consider the appropriate XML file. All attributes are not required. In java file all imports are not expected. Different relevant logic/code can be considered.)


activity_main.xml 
<?xml version="1.0" encoding="utf-8"?> 
<TableLayout 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" 
 android:stretchColumns="*" 
 tools:context=".MainActivity"> 
 <TableRow 
 android:layout_width="match_parent" 
 android:layout_height="wrap_content"> 
 <Button
android:layout_height="wrap_content" 
 android:layout_width="wrap_content" 
 android:id="@+id/button0" 
 android:text="0"/> 
 <Button 
 android:layout_height="wrap_content" 
 android:layout_width="wrap_content" 
 android:id="@+id/button1" 
 android:text="1"/> 
 <Button 
 android:layout_width="wrap_content" 
 android:layout_height="wrap_content" 
 android:id="@+id/button2" 
 android:text="2" /> 
 </TableRow> 
 <TableRow 
 android:layout_width="match_parent" 
 android:layout_height="wrap_content"> 
 <Button 
 android:layout_height="wrap_content" 
 android:layout_width="wrap_content" 
 android:id="@+id/button3" 
 android:text="3"/> 
 <Button 
 android:layout_height="wrap_content" 
 android:layout_width="wrap_content" 
 android:id="@+id/button4" 
 android:text="4"/> 
 <Button 
 android:layout_width="wrap_content" 
 android:layout_height="wrap_content" 
 android:text="5" 
 android:id="@+id/button5"/> 
 </TableRow> 
 <TableRow 
 android:layout_width="match_parent" 
 android:layout_height="wrap_content"> 
 <Button 
 android:layout_height="wrap_content" 
 android:layout_width="wrap_content" 
 android:text="6" 
 android:id="@+id/button6"/> 
 <Button 
 android:layout_height="wrap_content" 
 android:layout_width="wrap_content" 
 android:text="7