Some changes...
This commit is contained in:
@@ -184,7 +184,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
else if (tokensType.containsKey(chr.toString())) {
|
else if (tokensType.containsKey(chr.toString())) {
|
||||||
if (tokens.isNotEmpty()) {
|
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, "*")
|
tokens += Token(Tokens.Operations, "*")
|
||||||
if ((chr == '-') and (tokens.last().type != Tokens.Number))
|
if ((chr == '-') and (tokens.last().type != Tokens.Number))
|
||||||
tokens += Token(Tokens.Number, 0.toDouble())
|
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 |
@@ -6,6 +6,17 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".MainActivity">
|
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
|
<TextView
|
||||||
android:id="@+id/input"
|
android:id="@+id/input"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|||||||
Reference in New Issue
Block a user