The code is as follows
<linearlayout xmlns:android= "http://schemas.android.com/apk/res/android" android:layout_width= "Fill_parent" android:layout_height= "fill_parent" android:orientation= "vertical" > <tablelayout android:layout_width= "Match_parent" android:layout_height= "Wrap_content" > <!--the button that was added here exclusively line-and-<button Android:id= "@+id/button1" android:layout_width= "wrap_content" android:layout_height= "Wra P_content "android:text=" Exclusive entire line "/> <tablerow android:layout_width=" Wrap_content " android:layout_height= "Wrap_content" > <button android:id= "@+id/button2" Android:layout_width= "Wrap_content" android:layout_height= "wrap_content" android:text= "normal Press Button "/> <button android:id=" @+id/button3 "android:layout_width=" Wrap_content " Android:layout_height= "Wrap_content" android:text= "normal button"/> <button android:id= "@+id/but Ton4 "android:layout_width=" wrap_content "android:layout_height=" Wrap_content " android:text= "Normal button"/> </TableRow> </TableLayout> <tablelayout Android:layout_widt H= "Match_parent" android:layout_height= "wrap_content" android:stretchcolumns= "0" > <!--extrude first row- <!--the button that is added here exclusively one line--<button android:id= "@+id/button5" android:l Ayout_width= "Wrap_content" android:layout_height= "Wrap_content" android:text= "Exclusive entire line"/> < ; TableRow android:layout_width= "wrap_content" android:layout_height= "wrap_content" > &L T Button android:id= "@+id/button6" android:layout_width= "Wrap_content" Android: Layout_height= "Wrap_cOntent "android:text=" Stretch button "/> <button android:id=" @+id/button7 " Android:layout_width= "Wrap_content" android:layout_height= "Wrap_content" android:text= " Normal button "/> </TableRow> </TableLayout> <tablelayout android:layout_width=" Match_parent " android:layout_height= "Wrap_content" android:shrinkcolumns= "android:stretchcolumns=" 0 "> <!--La Bandi a row, shrinks the second third line--<!--the button that you added here exclusively--<button android:id= "@+id/bu Tton8 "android:layout_width=" wrap_content "android:layout_height=" Wrap_content "android:t ext= "Exclusive entire line"/> <tablerow android:layout_width= "wrap_content" android:layout_height= "wrap _content "> <button android:id=" @+id/button9 "android:layout_width=" Wrap_co Ntent "android:layout_height= "Wrap_content" android:text= "Stretch button"/> <button android:i D= "@+id/button10" android:layout_width= "wrap_content" android:layout_height= "Wrap_content" android:text= "pinch button"/> <button android:id= "@+id/button11" and Roid:layout_width= "Wrap_content" android:layout_height= "wrap_content" android:text= "pinch button"/& Gt <button android:id= "@+id/button12" android:layout_width= "Wrap_content" and roid:layout_height= "Wrap_content" android:text= "normal button"/> </TableRow> </tablelayout> ;</linearlayout>
Android layout tablelayout Beginner's Stretch button pinch button