<?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:background="#FFFFFF"    android:orientation="vertical" >    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:orientation="horizontal" >        <EditText            android:id="@+id/data"            android:layout_width="match_parent"            android:layout_height="wrap_content" />    LinearLayout>    <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" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="m+" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="m-" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="mr" />    LinearLayout>    <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="C" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="+/-" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="/" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="*" />    LinearLayout>    <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="7" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="8" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="9" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="-" />    LinearLayout>    <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="4" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="5" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="6" />        <Button            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:text="+" />    LinearLayout>    <LinearLayout        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:orientation="horizontal" >        <LinearLayout            android:layout_width="match_parent"            android:layout_height="wrap_content"            android:layout_weight="1"            android:orientation="vertical" >            <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="1" />                <Button                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_weight="1"                    android:text="2" />                <Button                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_weight="1"                    android:text="3" />            LinearLayout>            <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="0" />                <Button                    android:layout_width="match_parent"                    android:layout_height="wrap_content"                    android:layout_weight="2"                    android:text="." />            LinearLayout>        LinearLayout>        <LinearLayout            android:layout_width="match_parent"            android:layout_height="match_parent"            android:layout_weight="3" >            <Button                android:layout_width="match_parent"                android:layout_height="match_parent"                android:text="=" />        LinearLayout>    LinearLayout>LinearLayout>

Android 线性布局 计算器_第1张图片

更多相关文章

  1. 线性布局练习
  2. Android中你也许不知道的线性布局Layout_weight属性权重比例分配
  3. Android实训案例(一)——计算器的运算逻辑
  4. 语音计算器
  5. android Activity线性布局和表格布局实例讲解
  6. android LinearGradient线性渐变
  7. Android实现简单加法计算器
  8. Android实现加法计算器

随机推荐

  1. $.ajax同步/异步(async:false/true)解析
  2. element ui级联选择器--表单验证
  3. 如何临摹动漫人物?临摹绘画人物动漫教学!
  4. Ubuntu20.04服务器+Anaconda上创建Python
  5. element ui的form表单,一个input的值随着
  6. 搭建一个短视频APP可以用云服务器吗?如何
  7. JS高级ES6的6种继承方式
  8. webpack 配置文件webpack.config.js
  9. Python 函数装饰器应用教程
  10. 意派Epub360丨双12来袭,跟着淘宝学营销,海