Archived
1
0

Some changes...

This commit is contained in:
Sweet Bread
2022-12-05 20:33:00 +03:00
parent 0c190f2c71
commit cad75acb10
5 changed files with 36 additions and 1 deletions
@@ -184,7 +184,8 @@ class MainActivity : AppCompatActivity() {
}
else if (tokensType.containsKey(chr.toString())) {
if (tokens.isNotEmpty()) {
if ((tokensType[chr.toString()]!! == Tokens.BracketOpen) and (tokens.last().type == Tokens.Number))
if ((tokensType[chr.toString()]!! == Tokens.BracketOpen) and
(tokens.last().type in arrayOf(Tokens.Number, Tokens.Variable)))
tokens += Token(Tokens.Operations, "*")
if ((chr == '-') and (tokens.last().type != Tokens.Number))
tokens += Token(Tokens.Number, 0.toDouble())
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource">
<!-- <item-->
<!-- android:state_enabled="false"-->
<!-- android:drawable="@drawable/button_disabled" />-->
<!-- <item-->
<!-- android:state_pressed="true"-->
<!-- android:state_enabled="true"-->
<!-- android:drawable="@drawable/button_pressed" />-->
<!-- <item-->
<!-- android:state_focused="true"-->
<!-- android:state_enabled="true"-->
<!-- android:drawable="@drawable/button_focused" />-->
<item
android:state_enabled="true"
android:drawable="@drawable/button_enabled" />
</selector>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/design_default_color_primary_dark">
</solid>
</shape>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

+11
View File
@@ -6,6 +6,17 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<ImageView
android:id="@+id/imageView2"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/input"
app:srcCompat="@drawable/background" />
<TextView
android:id="@+id/input"
android:layout_width="0dp"