Skip to content

Commit 3d174d7

Browse files
authored
Merge pull request #122 from Yet-Zio/v1.1.4
v1.1.4
2 parents bd34a5f + 08d0112 commit 3d174d7

File tree

10 files changed

+198
-8
lines changed

10 files changed

+198
-8
lines changed

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ android {
1515
applicationId "yetzio.yetcalc"
1616
minSdk 21
1717
targetSdk 34
18-
versionCode 14
19-
versionName "1.1.3"
18+
versionCode 15
19+
versionName "1.1.4"
2020

2121
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2222
}

app/src/main/java/yetzio/yetcalc/MainActivity.kt

+12
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
6262
// Buttons - All
6363
private lateinit var gradbt: Button
6464
private lateinit var lambertW0bt: Button
65+
private lateinit var histOthBt: ImageButton
6566

6667
private lateinit var anglebt: Button
6768
private lateinit var othconstbt: Button
@@ -320,6 +321,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
320321
num3bt = findViewById(R.id.numberthree)
321322
num0bt = findViewById(R.id.numberzero)
322323
pointbt = findViewById(R.id.pointbutton)
324+
histOthBt = findViewById(R.id.histOthBt)
323325

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

348350
Paris.style(anglebt).apply(R.style.yetCalcBorderlessButtonsLDLight)
349351
Paris.style(sqrootbt).apply(R.style.yetCalcBorderlessButtonsLDLight)
352+
Paris.style(histOthBt).apply(R.style.yetCalcBorderlessButtonsHistLDLight)
350353
Paris.style(pibt).apply(R.style.yetCalcBorderlessButtonsLDLight)
351354

352355
Paris.style(othconstbt).apply(R.style.yetCalcBorderlessButtonsLDLight)
@@ -387,6 +390,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
387390
}
388391
else{
389392
Paris.style(sqrootbt).apply(R.style.yetCalcBorderlessButtonsLight)
393+
Paris.style(histOthBt).apply(R.style.yetCalcBorderlessButtonsHistLight)
390394
Paris.style(pibt).apply(R.style.yetCalcBorderlessButtonsLight)
391395
Paris.style(leftbracbt).apply(R.style.yetCalcBorderlessButtonsLight)
392396
Paris.style(rightbracbt).apply(R.style.yetCalcBorderlessButtonsLight)
@@ -420,6 +424,9 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
420424
Paris.style(bkspacebt).apply(R.style.yetCalcNumberButtonLight)
421425
}
422426
}
427+
else if(dark){
428+
Paris.style(histOthBt).apply(R.style.yetCalcBorderlessButtonsHist)
429+
}
423430
else{
424431
// for future themes
425432
}
@@ -662,6 +669,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AdapterView.OnIt
662669
for (bt in button_list){
663670
bt.setOnClickListener(this)
664671
}
672+
histOthBt.setOnClickListener(this)
665673
}
666674

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

12711279
private fun handleGeneralButtons(id: Int){
12721280
when(id){
1281+
R.id.histOthBt -> {
1282+
val hisintent = Intent(this, HistoryActivity::class.java)
1283+
histLauncher.launch(hisintent)
1284+
}
12731285
R.id.currentAngleView -> {
12741286
angleModeSetter()
12751287
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:name="vector"
4+
android:width="200dp"
5+
android:height="200dp"
6+
android:viewportWidth="432"
7+
android:viewportHeight="432">
8+
<path
9+
android:name="path"
10+
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"
11+
android:fillColor="#000000"
12+
android:fillAlpha="0.5"
13+
android:strokeWidth="1"/>
14+
<path
15+
android:name="path_1"
16+
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"
17+
android:fillColor="#000000"
18+
android:fillAlpha="0.3"
19+
android:strokeWidth="1"/>
20+
<path
21+
android:name="path_2"
22+
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"
23+
android:fillColor="#fefefe"
24+
android:strokeWidth="1"/>
25+
<path
26+
android:name="path_3"
27+
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"
28+
android:fillColor="#fefefe"
29+
android:strokeWidth="1"/>
30+
<path
31+
android:name="path_4"
32+
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"
33+
android:strokeWidth="1"/>
34+
<path
35+
android:name="path_5"
36+
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"
37+
android:fillColor="#fefefe"
38+
android:strokeWidth="1"/>
39+
<path
40+
android:name="path_6"
41+
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"
42+
android:fillColor="#fefefe"
43+
android:strokeWidth="1"/>
44+
<path
45+
android:name="path_7"
46+
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"
47+
android:fillColor="#fefefe"
48+
android:strokeWidth="1"/>
49+
<path
50+
android:name="path_8"
51+
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"
52+
android:fillColor="#00000000"
53+
android:strokeWidth="1"/>
54+
<path
55+
android:name="path_9"
56+
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"
57+
android:fillColor="#fefefe"
58+
android:strokeWidth="1"/>
59+
<path
60+
android:name="path_10"
61+
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"
62+
android:fillColor="#00000000"
63+
android:strokeWidth="1"/>
64+
<path
65+
android:name="path_11"
66+
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"
67+
android:fillColor="#fefefe"
68+
android:strokeWidth="1"/>
69+
<path
70+
android:name="path_12"
71+
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"
72+
android:fillColor="#000000"
73+
android:fillAlpha="0.1"
74+
android:strokeWidth="1"/>
75+
<path
76+
android:name="path_13"
77+
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"
78+
android:fillColor="#000000"
79+
android:fillAlpha="0.7"
80+
android:strokeWidth="1"/>
81+
<path
82+
android:name="path_14"
83+
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"
84+
android:strokeWidth="1"/>
85+
<path
86+
android:name="path_15"
87+
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"
88+
android:fillColor="#fefefe"
89+
android:strokeWidth="1"/>
90+
<path
91+
android:name="path_16"
92+
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"
93+
android:fillColor="#fefefe"
94+
android:strokeWidth="1"/>
95+
<path
96+
android:name="path_17"
97+
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"
98+
android:fillColor="#fefefe"
99+
android:strokeWidth="1"/>
100+
<path
101+
android:name="path_18"
102+
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"
103+
android:fillColor="#fefefe"
104+
android:strokeWidth="1"/>
105+
<path
106+
android:name="path_19"
107+
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"
108+
android:strokeWidth="1"/>
109+
<path
110+
android:name="path_20"
111+
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"
112+
android:fillColor="#000000"
113+
android:strokeWidth="1"/>
114+
<path
115+
android:name="path_21"
116+
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"
117+
android:fillColor="#fefefe"
118+
android:strokeWidth="1"/>
119+
<path
120+
android:name="path_22"
121+
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"
122+
android:strokeWidth="1"/>
123+
<path
124+
android:name="path_23"
125+
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"
126+
android:strokeWidth="1"/>
127+
<path
128+
android:name="path_24"
129+
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"
130+
android:strokeWidth="1"/>
131+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<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">
2+
3+
<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"/>
4+
5+
</vector>

app/src/main/res/layout-land/activity_main.xml

+9-1
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,18 @@
662662
style="@style/yetCalcBorderlessButtons"
663663
android:textSize="16sp"/>
664664

665+
<ImageButton
666+
android:id="@+id/histOthBt"
667+
android:layout_width="wrap_content"
668+
android:layout_height="wrap_content"
669+
android:layout_gravity="end"
670+
android:layout_marginStart="2dp"
671+
android:textSize="16sp" />
672+
665673
<Space
666674
android:layout_width="wrap_content"
667675
android:layout_height="wrap_content"
668-
android:layout_weight="15" />
676+
android:layout_weight="11" />
669677

670678
<Button
671679
android:id="@+id/varbutton"

app/src/main/res/layout/activity_main.xml

+6-4
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,12 @@
506506
style="@style/yetCalcBorderlessButtons"
507507
android:textSize="26sp" />
508508

509-
<View
510-
android:layout_width="0dp"
511-
android:layout_height="1dp"
512-
android:layout_weight="0.2" />
509+
<ImageButton
510+
android:id="@+id/histOthBt"
511+
android:layout_width="wrap_content"
512+
android:layout_height="wrap_content"
513+
android:layout_gravity="end"
514+
android:textSize="26sp" />
513515

514516
</LinearLayout>
515517

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background" />
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
5+
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
6+
</adaptive-icon>

app/src/main/res/values/strings.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22
<string name="author_name">Yet Zio</string>
33
<string name="app_name">yetCalc</string>
4-
<string name="VERSION_NUM">1.1.3</string>
4+
<string name="VERSION_NUM">1.1.4</string>
55
<string name="app_descrp">Yet another calculator by Yet Zio</string>
66
<string name="ghbtext">View on GitHub</string>
77
<string name="app_details">Free and open source software\nLicensed under the BSD-3-Clause license.</string>

app/src/main/res/values/themes.xml

+21
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@
134134
<item name="android:background">@drawable/extra_standard_land</item>
135135
</style>
136136

137+
<style name="yetCalcBorderlessButtonsHist" parent="@style/Widget.AppCompat.Button.Borderless">
138+
<item name="android:textColor">@color/calc_textdef</item>
139+
<item name="android:src">@drawable/ic_baseline_history_24</item>
140+
<item name="android:background">@drawable/extra_standard_land</item>
141+
</style>
142+
137143
<style name="yetCalcACButton">
138144
<item name="android:textColor">@color/lint_light</item>
139145
<item name="android:background">@drawable/ac_button</item>
@@ -320,6 +326,13 @@
320326
<item name="android:background">@drawable/extra_standard_landlight</item>
321327
</style>
322328

329+
<style name="yetCalcBorderlessButtonsHistLight" parent="@style/Widget.AppCompat.Button.Borderless">
330+
<item name="android:textColor">@color/black</item>
331+
<item name="android:textSize">26sp</item>
332+
<item name="android:src">@drawable/histothblack</item>
333+
<item name="android:background">@drawable/extra_standard_landlight</item>
334+
</style>
335+
323336
<style name="yetCalcACButtonLight">
324337
<item name="android:textColor">@color/pinkdark</item>
325338
<item name="android:textSize">32sp</item>
@@ -388,6 +401,14 @@
388401
<item name="android:background">@drawable/extra_standard_landlight</item>
389402
</style>
390403

404+
<style name="yetCalcBorderlessButtonsHistLDLight" parent="@style/Widget.AppCompat.Button.Borderless">
405+
<item name="android:textColor">@color/calc_textdeflight</item>
406+
<item name="android:textSize">23sp</item>
407+
<item name="android:textAllCaps">false</item>
408+
<item name="android:src">@drawable/ic_baseline_history_24light</item>
409+
<item name="android:background">@drawable/extra_standard_landlight</item>
410+
</style>
411+
391412
<style name="yetCalcACButtonLDLight">
392413
<item name="android:textColor">@color/pinkdark</item>
393414
<item name="android:textSize">23sp</item>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Enhancements
2+
3+
- Added monochromatic/themed icon support for Android 13 and above.
4+
5+
- History button now available in views directly for easy access.

0 commit comments

Comments
 (0)