Skip to content

Commit

Permalink
Merge pull request #122 from Yet-Zio/v1.1.4
Browse files Browse the repository at this point in the history
v1.1.4
  • Loading branch information
Yet-Zio committed Apr 2, 2024
2 parents bd34a5f + 08d0112 commit 3d174d7
Show file tree
Hide file tree
Showing 10 changed files with 198 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId "yetzio.yetcalc"
minSdk 21
targetSdk 34
versionCode 14
versionName "1.1.3"
versionCode 15
versionName "1.1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/java/yetzio/yetcalc/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
// Buttons - All
private lateinit var gradbt: Button
private lateinit var lambertW0bt: Button
private lateinit var histOthBt: ImageButton

private lateinit var anglebt: Button
private lateinit var othconstbt: Button
Expand Down Expand Up @@ -320,6 +321,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
num3bt = findViewById(R.id.numberthree)
num0bt = findViewById(R.id.numberzero)
pointbt = findViewById(R.id.pointbutton)
histOthBt = findViewById(R.id.histOthBt)

// Set theme
if(light){
Expand Down Expand Up @@ -347,6 +349,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt

Paris.style(anglebt).apply(R.style.yetCalcBorderlessButtonsLDLight)
Paris.style(sqrootbt).apply(R.style.yetCalcBorderlessButtonsLDLight)
Paris.style(histOthBt).apply(R.style.yetCalcBorderlessButtonsHistLDLight)
Paris.style(pibt).apply(R.style.yetCalcBorderlessButtonsLDLight)

Paris.style(othconstbt).apply(R.style.yetCalcBorderlessButtonsLDLight)
Expand Down Expand Up @@ -387,6 +390,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
}
else{
Paris.style(sqrootbt).apply(R.style.yetCalcBorderlessButtonsLight)
Paris.style(histOthBt).apply(R.style.yetCalcBorderlessButtonsHistLight)
Paris.style(pibt).apply(R.style.yetCalcBorderlessButtonsLight)
Paris.style(leftbracbt).apply(R.style.yetCalcBorderlessButtonsLight)
Paris.style(rightbracbt).apply(R.style.yetCalcBorderlessButtonsLight)
Expand Down Expand Up @@ -420,6 +424,9 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
Paris.style(bkspacebt).apply(R.style.yetCalcNumberButtonLight)
}
}
else if(dark){
Paris.style(histOthBt).apply(R.style.yetCalcBorderlessButtonsHist)
}
else{
// for future themes
}
Expand Down Expand Up @@ -662,6 +669,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
for (bt in button_list){
bt.setOnClickListener(this)
}
histOthBt.setOnClickListener(this)
}

override fun onClick(view: View?) {
Expand Down Expand Up @@ -1270,6 +1278,10 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt

private fun handleGeneralButtons(id: Int){
when(id){
R.id.histOthBt -> {
val hisintent = Intent(this, HistoryActivity::class.java)
histLauncher.launch(hisintent)
}
R.id.currentAngleView -> {
angleModeSetter()
}
Expand Down
131 changes: 131 additions & 0 deletions app/src/main/res/drawable-anydpi-v33/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="200dp"
android:height="200dp"
android:viewportWidth="432"
android:viewportHeight="432">
<path
android:name="path"
android:pathData="M 215.5 71.5 L 215.5 215.5 L 71.5 215.5 C 71.333 173.832 71.5 132.165 72 90.5 C 74.833 81 81 74.833 90.5 72 C 132.165 71.5 173.832 71.333 215.5 71.5 Z"
android:fillColor="#000000"
android:fillAlpha="0.5"
android:strokeWidth="1"/>
<path
android:name="path_1"
android:pathData="M 216.5 71.5 C 258.168 71.333 299.835 71.5 341.5 72 C 351 74.833 357.167 81 360 90.5 C 360.5 132.165 360.667 173.832 360.5 215.5 L 216.5 215.5 L 216.5 71.5 Z"
android:fillColor="#000000"
android:fillAlpha="0.3"
android:strokeWidth="1"/>
<path
android:name="path_2"
android:pathData="M 141.5 122.5 C 149.818 122.987 151.485 126.487 146.5 133 C 139.341 132.44 137.675 128.94 141.5 122.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_3"
android:pathData="M 260.5 132.5 L 273.5 132.5 C 273.708 134.92 273.374 137.253 272.5 139.5 C 266.81 138.47 261.976 140.136 258 144.5 C 256.959 147.636 257.793 150.136 260.5 152 C 263.507 152.301 266.507 152.135 269.5 151.5 C 269.148 154.428 268.482 157.262 267.5 160 C 250.286 161.789 244.786 154.622 251 138.5 C 253.843 135.837 257.009 133.837 260.5 132.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_4"
android:pathData="M 169.5 139.5 L 118.5 139.5 L 118.5 147.5 C 117.523 144.713 117.19 141.713 117.5 138.5 C 135.008 138.17 152.341 138.503 169.5 139.5 Z"
android:strokeWidth="1"/>
<path
android:name="path_5"
android:pathData="M 169.5 139.5 L 169.5 147.5 L 118.5 147.5 L 118.5 139.5 L 169.5 139.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_6"
android:pathData="M 295.5 153.5 C 294.539 155.265 294.205 157.265 294.5 159.5 C 291.212 159.927 288.212 159.26 285.5 157.5 C 284.893 157.624 284.56 157.957 284.5 158.5 C 277.715 162.416 273.715 160.416 272.5 152.5 C 275.964 140.263 283.964 136.096 296.5 140 C 297.059 140.725 297.392 141.558 297.5 142.5 C 296.574 146.13 295.907 149.797 295.5 153.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_7"
android:pathData="M 303.5 130.5 C 306.572 130.183 309.572 130.516 312.5 131.5 C 310.065 138.788 308.732 146.121 308.5 153.5 C 310.591 148.872 313.591 144.706 317.5 141 C 321.363 139.646 325.363 139.146 329.5 139.5 C 329.808 141.924 329.474 144.257 328.5 146.5 C 323.679 144.581 321.012 146.248 320.5 151.5 C 320.608 152.442 320.941 153.275 321.5 154 C 323.587 153.782 325.587 153.949 327.5 154.5 C 326.985 156.225 326.318 157.892 325.5 159.5 C 319.65 161.83 314.983 160.497 311.5 155.5 C 310.756 156.991 310.09 158.491 309.5 160 C 302.589 162.391 298.923 160.058 298.5 153 C 299.598 145.34 301.265 137.84 303.5 130.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_8"
android:pathData="M 285.5 145.5 C 286.675 145.281 287.675 145.614 288.5 146.5 C 287.833 149.844 286.166 152.511 283.5 154.5 C 281.922 150.958 282.588 147.958 285.5 145.5 Z"
android:fillColor="#00000000"
android:strokeWidth="1"/>
<path
android:name="path_9"
android:pathData="M 141.5 153.5 C 148.524 153.489 150.524 156.489 147.5 162.5 C 139.415 163.86 137.415 160.86 141.5 153.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_10"
android:pathData="M 295.5 153.5 L 295.5 160.5 C 291.498 160.964 287.831 160.298 284.5 158.5 C 284.56 157.957 284.893 157.624 285.5 157.5 C 288.212 159.26 291.212 159.927 294.5 159.5 C 294.205 157.265 294.539 155.265 295.5 153.5 Z"
android:fillColor="#00000000"
android:strokeWidth="1"/>
<path
android:name="path_11"
android:pathData="M 215.5 71.5 L 216.5 71.5 L 216.5 215.5 L 360.5 215.5 L 360.5 216.5 L 216.5 216.5 L 216.5 360.5 L 215.5 360.5 L 215.5 216.5 L 71.5 216.5 L 71.5 215.5 L 215.5 215.5 L 215.5 71.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_12"
android:pathData="M 71.5 216.5 L 215.5 216.5 L 215.5 360.5 C 173.832 360.667 132.165 360.5 90.5 360 C 81 357.167 74.833 351 72 341.5 C 71.5 299.835 71.333 258.168 71.5 216.5 Z"
android:fillColor="#000000"
android:fillAlpha="0.1"
android:strokeWidth="1"/>
<path
android:name="path_13"
android:pathData="M 360.5 216.5 C 360.667 258.168 360.5 299.835 360 341.5 C 357.167 351 351 357.167 341.5 360 C 299.835 360.5 258.168 360.667 216.5 360.5 L 216.5 216.5 L 360.5 216.5 Z"
android:fillColor="#000000"
android:fillAlpha="0.7"
android:strokeWidth="1"/>
<path
android:name="path_14"
android:pathData="M 178.5 274.5 L 178.5 270.5 L 170.5 270.5 C 173.607 268.653 176.94 268.32 180.5 269.5 C 179.972 271.336 179.306 273.003 178.5 274.5 Z"
android:strokeWidth="1"/>
<path
android:name="path_15"
android:pathData="M 170.5 270.5 L 178.5 270.5 L 178.5 274.5 C 180.025 276.036 182.025 277.036 184.5 277.5 C 184.417 282.86 181.75 284.86 176.5 283.5 C 175.886 287.135 175.552 290.802 175.5 294.5 L 179.5 294.5 C 179.78 297.272 179.113 299.772 177.5 302 C 173.833 302.667 170.167 302.667 166.5 302 C 165.944 301.617 165.611 301.117 165.5 300.5 L 165.5 287.5 C 165.843 285.517 165.176 284.183 163.5 283.5 C 163.993 281.194 164.326 278.861 164.5 276.5 L 167.5 276.5 C 167.386 273.784 168.386 271.784 170.5 270.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_16"
android:pathData="M 260.5 272.5 L 312.5 272.5 L 312.5 281.5 L 260.5 281.5 L 260.5 272.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_17"
android:pathData="M 161.5 279.5 L 161.5 286.5 C 160.284 288.451 158.618 289.951 156.5 291 C 153.136 291.727 149.803 292.56 146.5 293.5 C 147.005 294.919 148.005 295.585 149.5 295.5 C 151.981 296.258 154.648 296.258 157.5 295.5 L 157.5 300.5 C 142.181 306.658 135.348 301.658 137 285.5 C 140.909 277.129 147.409 273.963 156.5 276 C 158.584 276.697 160.251 277.864 161.5 279.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_18"
android:pathData="M 112.5 296.5 C 112.435 293.572 111.768 290.905 110.5 288.5 C 110.348 284.738 109.681 281.072 108.5 277.5 C 112.107 276.511 115.774 276.177 119.5 276.5 C 119.962 281.162 120.462 285.829 121 290.5 C 122.931 286.207 124.764 281.874 126.5 277.5 C 130.167 276.167 133.833 276.167 137.5 277.5 C 131.925 288.99 125.591 299.99 118.5 310.5 C 114.203 314.11 109.203 315.443 103.5 314.5 C 103.205 311.266 103.871 308.266 105.5 305.5 C 108.862 306.909 111.362 305.909 113 302.5 C 113.678 300.402 113.511 298.402 112.5 296.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_19"
android:pathData="M 164.5 276.5 C 164.326 278.861 163.993 281.194 163.5 283.5 C 162.833 284.5 162.167 285.5 161.5 286.5 L 161.5 279.5 C 162.9 278.9 163.9 277.9 164.5 276.5 Z"
android:strokeWidth="1"/>
<path
android:name="path_20"
android:pathData="M 149.5 281.5 L 152.5 281.5 C 152.594 284.541 151.094 286.207 148 286.5 C 147.387 284.505 147.887 282.838 149.5 281.5 Z"
android:fillColor="#000000"
android:strokeWidth="1"/>
<path
android:name="path_21"
android:pathData="M 260.5 293.5 L 312.5 293.5 L 312.5 301.5 L 260.5 301.5 L 260.5 293.5 Z"
android:fillColor="#fefefe"
android:strokeWidth="1"/>
<path
android:name="path_22"
android:pathData="M 165.5 287.5 L 165.5 300.5 C 164.102 299.223 163.436 297.557 163.5 295.5 C 163.804 292.614 164.471 289.948 165.5 287.5 Z"
android:strokeWidth="1"/>
<path
android:name="path_23"
android:pathData="M 110.5 288.5 C 111.768 290.905 112.435 293.572 112.5 296.5 C 110.96 294.162 110.294 291.495 110.5 288.5 Z"
android:strokeWidth="1"/>
<path
android:name="path_24"
android:pathData="M 157.5 300.5 L 157.5 295.5 C 154.648 296.258 151.981 296.258 149.5 295.5 C 152.148 294.838 154.815 294.171 157.5 293.5 C 158.167 293.833 158.833 294.167 159.5 294.5 C 158.95 296.657 158.283 298.657 157.5 300.5 Z"
android:strokeWidth="1"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/histothblack.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">

<path android:fillColor="@android:color/white" android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>

</vector>
10 changes: 9 additions & 1 deletion app/src/main/res/layout-land/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,18 @@
style="@style/yetCalcBorderlessButtons"
android:textSize="16sp"/>

<ImageButton
android:id="@+id/histOthBt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginStart="2dp"
android:textSize="16sp" />

<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="15" />
android:layout_weight="11" />

<Button
android:id="@+id/varbutton"
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,12 @@
style="@style/yetCalcBorderlessButtons"
android:textSize="26sp" />

<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="0.2" />
<ImageButton
android:id="@+id/histOthBt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:textSize="26sp" />

</LinearLayout>

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/mipmap-anydpi-v33/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<resources>
<string name="author_name">Yet Zio</string>
<string name="app_name">yetCalc</string>
<string name="VERSION_NUM">1.1.3</string>
<string name="VERSION_NUM">1.1.4</string>
<string name="app_descrp">Yet another calculator by Yet Zio</string>
<string name="ghbtext">View on GitHub</string>
<string name="app_details">Free and open source software\nLicensed under the BSD-3-Clause license.</string>
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@
<item name="android:background">@drawable/extra_standard_land</item>
</style>

<style name="yetCalcBorderlessButtonsHist" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textColor">@color/calc_textdef</item>
<item name="android:src">@drawable/ic_baseline_history_24</item>
<item name="android:background">@drawable/extra_standard_land</item>
</style>

<style name="yetCalcACButton">
<item name="android:textColor">@color/lint_light</item>
<item name="android:background">@drawable/ac_button</item>
Expand Down Expand Up @@ -320,6 +326,13 @@
<item name="android:background">@drawable/extra_standard_landlight</item>
</style>

<style name="yetCalcBorderlessButtonsHistLight" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textColor">@color/black</item>
<item name="android:textSize">26sp</item>
<item name="android:src">@drawable/histothblack</item>
<item name="android:background">@drawable/extra_standard_landlight</item>
</style>

<style name="yetCalcACButtonLight">
<item name="android:textColor">@color/pinkdark</item>
<item name="android:textSize">32sp</item>
Expand Down Expand Up @@ -388,6 +401,14 @@
<item name="android:background">@drawable/extra_standard_landlight</item>
</style>

<style name="yetCalcBorderlessButtonsHistLDLight" parent="@style/Widget.AppCompat.Button.Borderless">
<item name="android:textColor">@color/calc_textdeflight</item>
<item name="android:textSize">23sp</item>
<item name="android:textAllCaps">false</item>
<item name="android:src">@drawable/ic_baseline_history_24light</item>
<item name="android:background">@drawable/extra_standard_landlight</item>
</style>

<style name="yetCalcACButtonLDLight">
<item name="android:textColor">@color/pinkdark</item>
<item name="android:textSize">23sp</item>
Expand Down
5 changes: 5 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/15.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancements

- Added monochromatic/themed icon support for Android 13 and above.

- History button now available in views directly for easy access.

0 comments on commit 3d174d7

Please sign in to comment.