316 lines
11 KiB
XML
316 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
tools:context=".MainActivity">
|
|
|
|
<TextView
|
|
android:id="@+id/input"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/RPN_out"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/last_exp_out" />
|
|
|
|
<TextView
|
|
android:id="@+id/left_out"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/RPN_out" />
|
|
|
|
<TextView
|
|
android:id="@+id/right_out"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/left_out" />
|
|
|
|
<ScrollView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintBottom_toTopOf="@+id/linearLayout2"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/RPN_out">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical" >
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<Button
|
|
android:id="@+id/btn_sbm"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Вычислить" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btn_x"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="X" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_pi"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="π" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_elr"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="e" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btn_bro"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="(" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_brc"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text=")" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_pow"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="^" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_sqrt"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="sqrt" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/linearLayout2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/linearLayout"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btn_1"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="1" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_2"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="2" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_3"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="3" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btn_4"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="4" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_5"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="5" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_6"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="6" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btn_7"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="7" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_8"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="8" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_9"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="9" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btn_0"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="0" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_dot"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="." />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<Button
|
|
android:id="@+id/btn_add"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="+" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_sub"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="-" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_mul"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="*" />
|
|
|
|
<Button
|
|
android:id="@+id/btn_div"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="/" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical">
|
|
|
|
<Button
|
|
android:id="@+id/btn_equ"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:text="=" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/del"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:srcCompat="@android:drawable/ic_input_delete" />
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/last_exp_out"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@+id/input" />
|
|
|
|
<!-- <EditText-->
|
|
<!-- android:id="@+id/function_in"-->
|
|
<!-- android:layout_width="0dp"-->
|
|
<!-- android:layout_height="wrap_content"-->
|
|
<!-- android:ems="10"-->
|
|
<!-- android:hint="Введите уравнение:"-->
|
|
<!-- android:inputType="textPersonName"-->
|
|
<!-- android:text="y = "-->
|
|
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
|
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
|
<!-- app:layout_constraintTop_toBottomOf="@+id/graph" />-->
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |