為什么我最后兩行就是對不齊
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ? android:layout_width="match_parent"
? ? android:layout_height="match_parent"
? ? android:orientation="vertical" >
? ? <EditText
? ? ? ? android:id="@+id/editText1"
? ? ? ? android:layout_width="fill_parent"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:ems="10"?
? ? ? ? android:background="@drawable/while_bg"
? ? ? ? android:editable="false"
? ? ? ? android:gravity="right|bottom"
? ? ? ??
? ? ? ? >
</EditText>
<LinearLayout?
? ? android:layout_width="fill_parent"
? ? android:layout_height="wrap_content"
? ? android:layout_marginTop="20dp"
? ? android:orientation="horizontal"
android:gravity="center"
? ? >
? ?<Button
? ? ? ?android:id="@+id/btn_cleal"
? ? ? ?android:layout_width="60dp"
? ? ? ?android:layout_height="60dp"
? ? ? ?android:text="@string/two"
? ? ? ?android:gravity="right|bottom"
? ? ? ?android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_del"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="@string/three"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_divide"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="@string/four"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_multiply"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="@string/five"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
</LinearLayout>
<LinearLayout?
? ? android:layout_width="fill_parent"
? ? android:layout_height="wrap_content"
? ? android:layout_marginTop="10dp"
? ? android:orientation="horizontal"
android:gravity="center"
? ? >
? ?<Button
? ? ? ?android:id="@+id/btn_7"
? ? ? ?android:layout_width="60dp"
? ? ? ?android:layout_height="60dp"
? ? ? ?android:text="7"
? ? ? ?android:gravity="right|bottom"
? ? ? ?android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_8"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="8"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_9"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="9"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_jian"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="-"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
</LinearLayout>
<LinearLayout?
? ? android:layout_width="fill_parent"
? ? android:layout_height="wrap_content"
? ? android:layout_marginTop="10dp"
? ? android:orientation="horizontal"
android:gravity="center"
? ? >
? ?<Button
? ? ? ?android:id="@+id/btn_4"
? ? ? ?android:layout_width="60dp"
? ? ? ?android:layout_height="60dp"
? ? ? ?android:text="4"
? ? ? ?android:gravity="right|bottom"
? ? ? ?android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_5"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="5"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_6"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="6"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
? ? <Button
? ? ? ? android:id="@+id/btn_jia"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="60dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:text="+"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:textSize="20sp" />
</LinearLayout>
<LinearLayout?
? ? ? ?android:gravity="center_horizontal"
? ? ? ?android:layout_width="fill_parent"
? ? ? ?android:layout_height="wrap_content"
? ? ? ?android:layout_marginTop="10dp"
? ? ? ?android:orientation="horizontal">
? ? ? ? ? ?
? ? <LinearLayout
? ? ? ? android:layout_width="wrap_content"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? android:layout_marginTop="5dp"
? ? ? ? android:gravity="center_horizontal"
? ? ? ??
? ? ? ? android:orientation="vertical" >
? ? ? ? <LinearLayout
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? android:orientation="horizontal" >
? ? ? ? ? ? <Button
? ? ? ? ? ? ? ? android:id="@+id/but_1"
? ? ? ? ? ? ? ? android:layout_width="60dp"
? ? ? ? ? ? ? ? android:layout_height="60dp"
? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? android:gravity="right|bottom"
? ? ? ? ? ? ? ? android:text="1"
? ? ? ? ? ? ? ? android:textSize="20dp" />
? ? ? ? ? ? <Button
? ? ? ? ? ? ? ? android:id="@+id/but_2"
? ? ? ? ? ? ? ? android:layout_width="60dp"
? ? ? ? ? ? ? ? android:layout_height="60dp"
? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? android:gravity="right|bottom"
? ? ? ? ? ? ? ? android:text="2"
? ? ? ? ? ? ? ? android:textSize="20dp" />
? ? ? ? ? ? <Button
? ? ? ? ? ? ? ? android:id="@+id/but_3"
? ? ? ? ? ? ? ? android:layout_width="60dp"
? ? ? ? ? ? ? ? android:layout_height="60dp"
? ? ? ? ? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? ? ? ? ? android:gravity="right|bottom"
? ? ? ? ? ? ? ? android:text="3"
? ? ? ? ? ? ? ? android:textSize="20dp" />
? ? ? ? </LinearLayout>
? ? ? ?<LinearLayout android:layout_width="wrap_content"
? ? ? ? ? ?android:layout_height="wrap_content"
? ? ? ? ? ?android:orientation="horizontal" >
? ? ? ? ? ?<Button?
? ? ? ? ? ?android:id="@+id/but_0"
? ? ? ? ? ?android:layout_width="130dp"
? ? ? ? ? ?android:layout_height="60dp"
? ? ? ? ? ?android:text="0"
? ? ? ? ? ?android:layout_marginLeft="10dp"
? ? ? ? ? ?android:textSize="20dp" ? ?
? ? ? ? ? ? android:gravity="right|bottom"
? ? ? ? ? ? ? ?/>
? ? ? ? ? ? ? ?<Button?
? ? ? ? ? ?android:id="@+id/but_dian"
? ? ? ? ? ?android:layout_width="60dp"
? ? ? ? ? ?android:layout_height="60dp"
? ? ? ? ? ?android:text="."
? ? ? ? ? ?android:layout_marginLeft="10dp"
? ? ? ? ? ?android:textSize="20dp" ? ?
? ? ? ? ? ? android:gravity="right|bottom"
? ? ? ? ? ? ? ?/>
? ? ? ?</LinearLayout>
? ? ?</LinearLayout>
? ? <Button
? ? ? ? android:id="@+id/deng"
? ? ? ? android:layout_width="60dp"
? ? ? ? android:layout_height="130dp"
? ? ? ? android:gravity="right|bottom"
? ? ? ? android:text="="
? ? ? ? android:textSize="20dp" />
? ?</LinearLayout>
</LinearLayout>

2017-10-29
我直接在科室圖里面拉效果