android线性布局之计算器的界面实现.docx
《android线性布局之计算器的界面实现.docx》由会员分享,可在线阅读,更多相关《android线性布局之计算器的界面实现.docx(7页珍藏版)》请在冰豆网上搜索。
android线性布局之计算器的界面实现
〈?
xmlversion=”1。
0"encoding=”utf—8"?
>
—-总布局开始位置-—〉
android=”http:
//schemas.android。
com/apk/res/android”
android:
layout_width="match_parent”
android:
layout_height=”match_parent"
android:
orientation=”vertical"
android:
paddingTop=”5dip”>
android:
layout_width=”match_parent”
android:
layout_height=”wrap_content"
android:
orientation="horizontal”>
android:
id=”@+id/msg"
android:
layout_width="match_parent”
android:
layout_height="wrap_content">
〈/EditText>
〈/LinearLayout>
最上层的输入框的布局
布局可以嵌套布局
android:
layout_width="match_parent"
android:
layout_height="wrap_content”
android:
orientation="horizontal”>
〈Button
android:
layout_width=”match_parent”
android:
layout_height=”wrap_content”
android:
layout_weight=”1"
android:
text=”mc">
〈Buttonandroid:
layout_width=”0px”android:
layout_height="wrap_content”
android:
text=”。
"android:
layout_weight="1">
〈/LinearLayout>
〈LinearLayoutandroid:
orientation=”horizontal"
android:
layout_width=”wrap_content"andr