How to make a scientific calculator in Android Studio 2021 | Part 4
HTML-код
- Опубликовано: 2 мар 2021
- In this video, you will learn how to make a calculator in Android Studio using Java. This scientific calculator will be able to perform many functions like calculating exponentials, basic arithmetic, trig and inverse trig functions, and much more! All of this will be made possible through the use of a math parser called Mxparser. You will learn how you can download the Mxparser library and use it in your Android Studio projects.
We will be covering some of the core functions and techniques used for app development in Android Studio. This tutorial is designed for beginners trying to get started in app development with Android devices being the primary target.
Join the Discord Server!!!
/ discord
Android Studio is a great platform for creating apps that can be deployed on the google play store. If you're new to the series I'd go and check out the Android Studio Playlist. There you will be able to see how to create basic apps so you can become a developer.
Check out the Android development playlist for more videos like this!
• Android App Developmen...
Here's the link to the GitHub repository:
github.com/Practical-Coding3/...
mXparser Function Page:
mathparser.org/mxparser-math-c...
#androidstudio #appdevelopment #PracticalCoding - Хобби
If you have any questions you can always join the Discord server too. Here's the link if you wanna stop by
discord.gg/evK6jwg4Xj
Thank you for this tutorial I already done creating the app. Smooth and clear from start to finish. Recommended for complete beginners like me!
This video series was awsome ! Your explanations was so complete and the video quality is incredible ! Go ahead and don't give up !
Thanks! Always good to hear that people are liking the videos I put out
I just adore youuu,....I've been following you for a long time, I admire your work, it's incredible and I've learned a lot from you. Thank you very much for your time and wonderful work. Seriously, from the bottom of my heart...."If possible, could you please do the part 5, about how to setup the calculation history?"
Millions thankssssssssssssssssss...
Thank you so much for this series. I am a complete beginner to Android app development and this honestly helped me a lot. You are amazing.
You are the best human being on earth man. This is my second project in developing and so excited to do more projects. BTW his series inspired me to do a calculator on my own which I am going to start sooon.! Thanks again.
Best explaination!! I completed in 12 hours. Feeling extremely happy.
Thanks a ton!!!!!!
keep doing many such videos ☺☺
That's great! Glad you liked the videos
Thank you so much! excellent work!💯
Amazing series I learned so much!
Please continue making those awesome videos.
best series yet, keep up the great work. a cool addition to this app would be something to trim unnecessary decimal places from the output. like if you enter 9x9 currently it shows "81.0" . It would be nice if it showed as "81" and only used the extra decimal figures when necessary for the calculation
That's a really good idea. I like it. I know some calculations will give you like 10 decimal places.
How you've done it?
Thank you very much sir! You help me to finish my Midterm project.
The whole series was awesome... Thanks a lot...
Glad you liked it!
we will support you
carry on💕💕💕
Thank you for this video series 💖 They were super helpful for a subject in my course. You explain well and efficiently. Keep it up 😁🤗
Glad you liked the videos!
Thank you for your great explanation
Thank you so much, greetings from Belarus!
Happy to help!
Your video always helps me.. Thank you...
This video series was great; I can't explain it.....
Your explanations that's were so complete and the video quality is incredible!
Go ahead and don't give up!❤❤❤❤❤
Thanks! Love hearing that people are enjoying the video I put out
You are at 859 Soon 900 & then 1K SUBS! Good Luck!
I know it's kinda crazy. Good to hear from you!
Perfect!✨ Keep up the good work💯
Glad you found the videos helpful!
Thanks a lot for these amazing tutorials:)
Glad you like them!
Thank you so much
Thankyou so much...
thank you very much
Thanks broo..
you really make amazing videos , I made the app and it was really awsome .
Thanks! Glad you liked the video
thank you!!!!!
This video is awesome, i like your video
Thanks! Glad you liked it
your videos are really awesome. can make a video series on a music player app? I'm asking this because the way you explain everything is really good and helpful.
That's probably something I can do in the future. I'll add it to my list of video ideas but it probably won't be for a while. I have a lot of others on the list already
Maaaaan!! Thanks a lot!!
Thank you very much, your way of explaining things is amazing. Well done 👍👍😁
Thanks! Good to hear you liked the videos
@@PracticalCoding there is some buttons which are not working correctly. I couldn't understand why are they giving the wrong Answer or NAN
@@yazanmahfod8533 That was my bad. For the log button, you need to specify which base you want to use. I was just going too fast and forgot to add that in. So if you change the Log button method from updating the display with "log" to "log10" it should work.
I'd take a look at the mXparser website to see what their library is looking for when evaluating expressions too.
Here's the link:
mathparser.org/mxparser-math-collection/unary-functions/
@@PracticalCoding thank you very much for the fast answer I will try to correct it after having a look at the library
Awesome videos. I was create a scientific calculator follow this video series step by step, so thanks u for necessary video. And i will waiting for ur up coming necessary video.
Dear. I have a necessary question. The question is. This calculator have not % parsent button. So if u solve this issue for ur kind I would have benefited. So thank u.
Great video man. Thanks a ton❤. Can you please help us make a unit converter app
Glad you liked the videos! And yeah I could see about making one of those. It won't be for a while though because I'm taking the MCAT in a few weeks. Most of my time has been spent studying for that
Thanks a lot. A very good work. I like your step by step way of explanation. Please include a function which can work before brackets. There is an error while performing sums before brackets e.g 3(5+6). Again thanks a lot
Glad you liked the videos! I think that error happens because of the way mXparser evaluates the expressions. If you wanted to fix that issue, you'd just have to make a function that goes through the string to find numbers next to open parentheses. With your example 3(5+6) you'd just need to turn it into 3*(5+6) before sending it through mXparser's calculate method
thank for your help to develop to a calculator thank u so much....
Glad the videos were helpful!
@@PracticalCoding how to share another phones apk
@@vyshanvprasannakumar646 Are you looking for how to make that app into an apk so you can send it around?
@@PracticalCoding yes , creating app into apk and send to friend
how to send??
its so great videos playlist , i think a bad scenario for decimalBTNPush for one use for every number not like this (.........)
Great Tutorial. Just got to the point near the end of the video where you run on the emulator for some reason on mine when I go into Landscape mode it just shows the same 'portrait' calculator rotated by 90 degrees.
Have I missed something obvious? Thanks
Found out the problem. Did not realise you had to click the 'rotate' icon that flashes up on the emulator device.
@@richardlongshaw8079 Oh I gotcha. Good to hear you got it working though!
Could you please show us how to add a history button that stores all previous expressions with their answers?
I could probably do that at some point. I'll add it to my running list of video ideas.
At some point in the next few weeks, I'm gonna be posting a notes app. If you end up watching that when I post it, you'll probably have everything you need to make the history section
6:38 Why do you have left constraint for arithmetic buttons, even though at 5:30 you told us to delete them?
also I have a problem. When I rotate my phone emulator, it doesn't switch to land.xml, it stays on layout.xml, but just rotates to 180 degree. I'm using the newest Android Studio and I noticed, that my activity_mail.xml of the the land page is stored into another folder, called layout-land(created by Android Studio by default). Dragging the xml of the land page into folder of layout page doesn't solve the problem. Do you have any suggestions? Thanks!
Excellent finally I have done it however I got one mistake after launching in mobile phone in landscape model one row is escaped I mean one row is not visible
Huh, that's weird. Could you join this channel's Discord server and send a picture or video of what's happening? It's a little hard to help you solve the problem without actually seeing what's happening
Here's the link
discord.gg/H2P89STbaS
My phone screen is larger than the one on the emulator, as I am facing a problem with the compatibility and coordination of the buttons, what is the solution?
I am working on calculator app. how to use rad and deg in sin,cos,tan functions in calculator? any idea?
I'm not entirely sure if that's supported. If you take a look at their website, they might have a way to do that but chances are you'll have to implement that yourself. I think this question came up a while back and if I remember correctly they only support radians. Maybe things have changed since then
Here's a link to the website
mathparser.org/
How to develop attendance app teachers and students ?
I got a problem while running the app, that is when I click on buttons it's not responding and, I get a warning that the Android older platform is broken ... Can you plz help me
Hey bro trignometric Or other functions are not working it show NaN on pressing equal to
can you send me what you have in the calculate function?
@@PracticalCoding ok but tomorrow
Hi, I've done this calculator app now and everything was okay. I was trying to test it on my physical device, the app get installed but it is not opening. What is the solution and why this happens??????
Sir I tried to make 2 different activities and in the second activity I am using these 2 layouts of calculator (portrait and landscape) but now I'm not able to change my calculator to landscape after running it. Can u pls help this
Did the landscape version ever work at some point? Or did it stop working after you added in a new activity? Maybe you created a landscape variation for the other activity by accident
How to add permutation and combination functionality ?
All you would really have to do is write a method that does your permutations and combinations. Then, when the user clicks a button, just call one of those methods. I'd probably make it so when you press either the permutation or combination button, it acts almost like the equals button, but rather than using the mXparser library methods, you'd call your own
@@PracticalCoding okay.
bro trignometric or other functions are not working plz help
There is a problem to build apk file..
When i an going to build apk file then it shows error (Parseerror at row and col) ..plz help me solve this error
Hey! I'd be happy to help you solve this problem. Could you join this channel's Discord server and post a picture of the error message or leave the entire message in a comment so I can take a look at it?
Here's the link if you wanna join:
discord.gg/H2P89STbaS
Hello sir
If I write this type of exp (4×4)(4+3) in this app it's showing error???
Please check it
Hey, that's because mXparser doesn't know what to do when the parentheses implicitly indicate multiplication. What you need to do is add an additional check for the following string ")(" and if it's there, replace it with ")*(". Maybe mXparser will add the ability to evaluate an expression like (4×4)(4+3) without the multiplication sign between the parentheses, but for now, we have to add that additional check before passing the expression over to mXparser.
Hope that helps!
@@PracticalCoding ok😊
Hello ..I have a problem when I run the project a problem appears ..transforms input file does not exist what should I do?
Could you paste the error message in a comment so I can look at it? I might need you to head over to the Discord server so I can see what's happening. Just from what you've said so far, I have a feeling that mXparser might be installed incorrectly.
@@PracticalCoding yes that was the problem I have jdk version 11 on my Android studio but I used the library of jdk 8 in my project🤦so I deleted it and then paste jdk 11
When I try using log(5) or log of some number i get ans as NaN
Yeah, that was my bad. If you look at the documentation for the mXparser library, you'll see you need to add the base of the log too. So for a normal log (base 10) you need to and 10 to the end of the log string. So instead of adding "log" to the display, you'll need to add in "log10"
Hello sir
The cos(30) and other trigonometric functions are not giving correct answer and also
After clicking scientific functions like cos( , sin( the cursor is displaying after c in cos( and similarly with other functions
How to solve this problem please reply sir
Hey! I believe I helped someone out with this issue a few weeks back and from what I remember, mXparser was evaluating those functions in either degrees or radians. There should be a way to specify which mode you want mXparser to be in or you have to convert the value.
For example, when I have my calculator set to RADIANS I get this value for cos(30) = 0.154251
but when I have my calculator set to DEGREES I get this value for cos(30) = 0.866025
I took a look at the documentation for mXparser and it looks like they have functions that you can use to convert between degrees and radians and radians to degrees. You can probably add an additional button somewhere to set the mode of the calculator and convert the answer initially given by mXparser based on what mode the user sets for the calculator. Maybe there's something that you can pass into mXparser's class when we first create an instance. I'm not aware of anything like that so you'd have to sift through the documentation
Here's the link to the documentation page specifically to the functions that convert degrees to radians and radians to degrees.
mathparser.org/mxparser-math-collection/unary-functions/
If you're having trouble with anything else, you can always join this channel's Discord server to get help too. Here's the link if you wanna check it out
discord.gg/H2P89STbaS
1st of all thanks for teaching so amazingly.... but Log button is not working.... It always give output "NaN"
That was my bad. For the log button, you need to specify which base you want to use. I was just going too fast and forgot to add that in. So if you change the Log button method from updating the display with "log" to "log10" it should work.
I'd take a look at the mXparser website to see what their library is looking for when evaluating expressions too.
Here's the link:
mathparser.org/mxparser-math-collection/unary-functions/
@@PracticalCoding now it works fine.... Thanx for replying so quick
@Lucas Kowalski You need to go into the update text method for the log button and instead of updating the display with just "log" it needs to be "log10"
sry but I can’t find these scientific calculating strings in your github...
Go to this link and scroll down just a little bit and the strings should be there
github.com/Practical-Coding3/ScientificCalculator
@@PracticalCoding Well I can find the basic strings and colors but miss the scientific ones like tan, cos .
@@user-xz4xu4ni5r Ohhh that's my bad. Never added those string to it. I just updated the readme file with those strings
@@PracticalCoding thx! :)
there is no simbol Degree minute second
or how to convert Decimal degree To degree minute second like complete scientific calculator, thank You