展会信息港展会大全

android 使用intent传递参数实现乘法计算
来源:互联网   发布日期:2016-01-14 09:29:50   浏览:1565次  

导读:主界面上是两个EditText和一个按钮。用于输入两个数字参数。calcute.xml:<?xml version="1.0" encoding="utf-8"?><LinearLa...

主界面上是两个EditText和一个按钮。用于输入两个数字参数。

calcute.xml:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:gravity="center">

<LinearLayout

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:orientation="horizontal"

android:gravity="center"

>

<EditText

android:id="@+id/factory1"

android:layout_height="wrap_content"

android:layout_width="100dip"

/>

<TextView

android:layout_width="50dip"

android:layout_height="wrap_content"

android:text="X"

android:layout_marginLeft="30dip"

/>

<EditText

android:id="@+id/factory2"

android:layout_height="wrap_content"

android:layout_width="100dip"

/>

</LinearLayout>

<Button

android:id="@+id/calute"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="计算"

/>

</LinearLayout>

赞助本站

人工智能实验室

相关热词: android开发 教程

相关内容
AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港