多功能操作

时间:2016-09-24 08:39:07

标签: android

我是android studio的新手......

我正在尝试创建一个计算器,但我有两个基本问题......

首先如何在 MainActivity.java 中定义点(或点)操作?

第二是如何打破多个功能(例如25*3+45/4+sin(45))?

和第三个只是为了好玩:如何在我为结果创建的第二个textview中显示答案?

喜欢实时回答?

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/linearLayout1"
    android:layout_marginLeft="10pt"
    android:layout_marginRight="10pt"
    android:layout_marginTop="3pt">
    <TextView
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:layout_marginRight="5pt"
        android:id="@+id/input"
        android:layout_width="match_parent">
    </TextView>

    <TextView
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:layout_marginLeft="5pt"
        android:id="@+id/result"
        android:layout_width="match_parent">
    </TextView>
</LinearLayout>

0 个答案:

没有答案