為什么下面的布局代碼會造就這樣的界面? 請教大神問題出在哪里?<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"? ? xmlns:tools="http://schemas.android.com/tools"? ? android:id="@+id/LinearLayout1"? ? android:layout_width="match_parent"? ? android:layout_height="match_parent"? ? android:gravity="center_horizontal"? ? android:orientation="vertical"? ? tools:context="${relativePackage}.${activityClass}" >? ? <TableLayout? ? ? ? android:layout_marginTop="8dp"? ? ? ? android:layout_width="match_parent"? ? ? ? android:layout_height="wrap_content"? ? ? ? android:stretchColumns="*"? ? ? ? ?>? ? ? ? <TableRow? ? ? ? ? ? android:id="@+id/tableRow1"? ? ? ? ? ? android:layout_width="wrap_content"? ? ? ? ? ? android:layout_height="wrap_content"?? ? ? ? ? ? android:gravity="center_horizontal"?>? ? ? ? ? ? <Button? ? ? ? ? ? ? ? android:id="@+id/btnClean"? ? ? ? ? ? ? ? android:layout_width="wrap_content"? ? ? ? ? ? ? ? android:layout_height="wrap_content"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/lgray_selector"? ? ? ? ? ? ? ? android:text="C" />? ? ? ? ? ? 省略……? ? ? ? </TableRow>? ? ? ? <TableRow? ? ? ? ? ? android:id="@+id/tableRow2"? ? ? ? ? ? android:layout_width="wrap_content"? ? ? ? ? ? android:layout_height="wrap_content"? ? ? ? ? ? android:gravity="center_horizontal" >? ? ? ? ? ? <Button? ? ? ? ? ? ? ? android:id="@+id/btn7"? ? ? ? ? ? ? ? android:layout_width="wrap_content"? ? ? ? ? ? ? ? android:layout_height="wrap_content"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector"? ? ? ? ? ? ? ? android:text="7" />? ? ? ? ? ? 省略……? ? ? ? </TableRow>? ? ? ? <TableRow? ? ? ? ? ? android:id="@+id/tableRow3"? ? ? ? ? ? android:layout_width="wrap_content"? ? ? ? ? ? android:layout_height="wrap_content"? ? ? ? ? ? android:gravity="center_horizontal" >? ? ? ? ? ? <Button? ? ? ? ? ? ? ? android:id="@+id/btn4"? ? ? ? ? ? ? ? android:layout_width="wrap_content"? ? ? ? ? ? ? ? android:layout_height="wrap_content"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector"? ? ? ? ? ? ? ? android:text="4" />? ? ? ? ? ? 省略……? ? ? ? </TableRow>? ? </TableLayout>? ? ? ? <LinearLayout ? ? ? ?android:layout_width="match_parent" ? ? ? ?android:layout_height="wrap_content" ? ? ? ?android:gravity="center_horizontal" ? ? ? ?android:orientation="horizontal" > ? ?<LinearLayout ? ? ? ?android:layout_width="0dp" ? ? ? ?android:layout_height="match_parent" ? ? ? ?android:layout_weight="3" ? ? ? ?android:orientation="vertical" > ? ? ? ?<LinearLayout ? ? ? ?android:layout_width="fill_parent" ? ? ? ?android:layout_height="wrap_content" ? ? ? ?android:gravity="center_horizontal" ? ? ? ?android:layout_weight="2" > <TableLayout? ? ?android:layout_width="match_parent" ? ?android:layout_height="match_parent" ? ?android:stretchColumns="*" > ? ?<TableRow ? ? ? ?android:layout_width="match_parent" ? ? ? ?android:layout_height="match_parent" > ? ? ? ? ? ?<Button ? ? ? ? ? ? ? ?android:id="@+id/btn1"? ? ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? ? ?android:layout_height="wrap_content"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector" ? ? ? ? ? ? ? ?android:text="1" /> ? ? ? ? ? ?<Button ? ? ? ? ? ? ? ?android:id="@+id/btn2"? ? ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? ? ?android:layout_height="wrap_content"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector" ? ? ? ? ? ? ? ?android:text="2" /> ? ? ? ? ? ?<Button ? ? ? ? ? ? ? ?android:id="@+id/btn3"? ? ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? ? ?android:layout_height="wrap_content"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector" ? ? ? ? ? ? ? ?android:text="3" /> ? ? ? ? ? ?</TableRow> ? ? ? ? ? ?</TableLayout> ? ? ? ?</LinearLayout> <LinearLayout ? ? ? ?android:layout_width="match_parent" ? ? ? ?android:layout_height="wrap_content" ? ? ? ?android:gravity="center_horizontal" ? ? ? ?android:layout_weight="2" > ? ?<TableLayout? ? ?android:layout_width="match_parent" ? ?android:layout_height="match_parent" ? ?android:stretchColumns="*" > ? ?<TableRow ? ? ? ?android:layout_width="match_parent" ? ? ? ?android:layout_height="match_parent" > ? ? ? ? ? ?<Button ? ? ? ? ? ? ? ?android:id="@+id/btn0"? ? ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? ? ?android:layout_height="match_parent"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector"? ? ? ? ? ? ? ? android:layout_span="2" ? ? ? ? ? ? ? ?android:text="0" ?/> ? ? ? ? ? ?<Button ? ? ? ? ? ? ? ?android:id="@+id/btnDot"? ? ? ? ? ? ? ? android:layout_width="wrap_content" ? ? ? ? ? ? ? ?android:layout_height="match_parent"? ? ? ? ? ? ? ? android:height="70dp"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/white_selector" ? ? ? ? ? ? ? ?android:text="." /> ? ? ? ? ? ?</TableRow> ? ? ? ? ? ?</TableLayout> ? </LinearLayout> ? </LinearLayout>? ? ? ?<Button ? ? ? ? ? ?android:id="@+id/btnEqual" ? ? ? ? ? ?android:layout_width="0dp" ? ? ? ? ? ? ? ?android:layout_height="match_parent"? ? ? ? ? ? ? ? android:textSize="22sp"? ? ? ? ? ? ? ? android:layout_weight="1"? ? ? ? ? ? ? ? android:layout_margin="3dp"? ? ? ? ? ? ? ? android:background="@drawable/orange_selector" ? ? ? ? android:text="=" /> </LinearLayout></LinearLayout>
添加回答
舉報
0/150
提交
取消