How to make a scientific calculator in Android Studio 2021 | Part 4

  Рет қаралды 12,441

Practical Coding

Practical Coding

3 жыл бұрын

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

Пікірлер: 110
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@ailekzavy
@ailekzavy Ай бұрын
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...
@neoslife2493
@neoslife2493 3 жыл бұрын
This video series was awsome ! Your explanations was so complete and the video quality is incredible ! Go ahead and don't give up !
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Thanks! Always good to hear that people are liking the videos I put out
@cherryanns4343
@cherryanns4343 Жыл бұрын
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.
@pongkan4212
@pongkan4212 Жыл бұрын
Thank you for this tutorial I already done creating the app. Smooth and clear from start to finish. Recommended for complete beginners like me!
@mustafaausaf
@mustafaausaf Жыл бұрын
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.
@knramya6296
@knramya6296 3 жыл бұрын
Best explaination!! I completed in 12 hours. Feeling extremely happy. Thanks a ton!!!!!! keep doing many such videos ☺☺
@PracticalCoding
@PracticalCoding 3 жыл бұрын
That's great! Glad you liked the videos
@creamyturtle69
@creamyturtle69 3 жыл бұрын
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
@PracticalCoding
@PracticalCoding 3 жыл бұрын
That's a really good idea. I like it. I know some calculations will give you like 10 decimal places.
@RedasGamesCom
@RedasGamesCom 3 жыл бұрын
How you've done it?
@Reueldejoya
@Reueldejoya 2 жыл бұрын
Thank you very much sir! You help me to finish my Midterm project.
@that_soumen
@that_soumen 2 жыл бұрын
we will support you carry on💕💕💕
@mido03
@mido03 2 жыл бұрын
Amazing series I learned so much! Please continue making those awesome videos.
@scarletsnow0185
@scarletsnow0185 3 жыл бұрын
Thank you for this video series 💖 They were super helpful for a subject in my course. You explain well and efficiently. Keep it up 😁🤗
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Glad you liked the videos!
@that_soumen
@that_soumen 2 жыл бұрын
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!❤❤❤❤❤
@PracticalCoding
@PracticalCoding 2 жыл бұрын
Thanks! Love hearing that people are enjoying the video I put out
@riofransiskussimanjuntak_0601
@riofransiskussimanjuntak_0601 Жыл бұрын
Thank you for your great explanation
@senorchampinon9114
@senorchampinon9114 3 жыл бұрын
Thank you so much! excellent work!💯
@sumitadhikari7617
@sumitadhikari7617 2 жыл бұрын
Your video always helps me.. Thank you...
@evelina_abilova
@evelina_abilova 2 жыл бұрын
Thank you so much, greetings from Belarus!
@PracticalCoding
@PracticalCoding 2 жыл бұрын
Happy to help!
@bhargavjoshi6465
@bhargavjoshi6465 3 жыл бұрын
The whole series was awesome... Thanks a lot...
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Glad you liked it!
@realfaw
@realfaw 3 жыл бұрын
You are at 859 Soon 900 & then 1K SUBS! Good Luck!
@PracticalCoding
@PracticalCoding 3 жыл бұрын
I know it's kinda crazy. Good to hear from you!
@aishwaryanair753
@aishwaryanair753 3 жыл бұрын
Perfect!✨ Keep up the good work💯
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Glad you found the videos helpful!
@bhaweshmadhwani1801
@bhaweshmadhwani1801 3 жыл бұрын
Thanks a lot for these amazing tutorials:)
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Glad you like them!
@manishstar11
@manishstar11 2 жыл бұрын
Thankyou so much...
@totajo1267
@totajo1267 2 жыл бұрын
you really make amazing videos , I made the app and it was really awsome .
@PracticalCoding
@PracticalCoding 2 жыл бұрын
Thanks! Glad you liked the video
@myth6628
@myth6628 10 ай бұрын
thank you very much
@yanpepik3130
@yanpepik3130 3 жыл бұрын
Maaaaan!! Thanks a lot!!
@ProGamer2017
@ProGamer2017 2 жыл бұрын
Thank you so much
@yazanmahfod8533
@yazanmahfod8533 3 жыл бұрын
Thank you very much, your way of explaining things is amazing. Well done 👍👍😁
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Thanks! Good to hear you liked the videos
@yazanmahfod8533
@yazanmahfod8533 3 жыл бұрын
@@PracticalCoding there is some buttons which are not working correctly. I couldn't understand why are they giving the wrong Answer or NAN
@PracticalCoding
@PracticalCoding 3 жыл бұрын
@@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/
@yazanmahfod8533
@yazanmahfod8533 3 жыл бұрын
@@PracticalCoding thank you very much for the fast answer I will try to correct it after having a look at the library
@samuelefendipurba6314
@samuelefendipurba6314 3 жыл бұрын
Thanks broo..
@gameandelectronic8369
@gameandelectronic8369 3 жыл бұрын
This video is awesome, i like your video
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Thanks! Glad you liked it
@tallerfrodo1262
@tallerfrodo1262 3 жыл бұрын
thank you!!!!!
@patrickmuthusi9005
@patrickmuthusi9005 3 жыл бұрын
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
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@walisplayground2329
@walisplayground2329 2 жыл бұрын
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.
@PracticalCoding
@PracticalCoding 2 жыл бұрын
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
@shakinurkhan2297
@shakinurkhan2297 2 жыл бұрын
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.
@vyshanvprasannakumar646
@vyshanvprasannakumar646 3 жыл бұрын
thank for your help to develop to a calculator thank u so much....
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Glad the videos were helpful!
@vyshanvprasannakumar646
@vyshanvprasannakumar646 3 жыл бұрын
@@PracticalCoding how to share another phones apk
@PracticalCoding
@PracticalCoding 3 жыл бұрын
@@vyshanvprasannakumar646 Are you looking for how to make that app into an apk so you can send it around?
@vyshanvprasannakumar646
@vyshanvprasannakumar646 3 жыл бұрын
@@PracticalCoding yes , creating app into apk and send to friend how to send??
@ashutoshdash805
@ashutoshdash805 3 жыл бұрын
Great video man. Thanks a ton❤. Can you please help us make a unit converter app
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@noureldin1774
@noureldin1774 6 ай бұрын
its so great videos playlist , i think a bad scenario for decimalBTNPush for one use for every number not like this (.........)
@tarsemlal1720
@tarsemlal1720 Жыл бұрын
Hey bro trignometric Or other functions are not working it show NaN on pressing equal to
@PracticalCoding
@PracticalCoding Жыл бұрын
can you send me what you have in the calculate function?
@tarsemlal1720
@tarsemlal1720 Жыл бұрын
@@PracticalCoding ok but tomorrow
@goodgamershow6505
@goodgamershow6505 3 жыл бұрын
6:38 Why do you have left constraint for arithmetic buttons, even though at 5:30 you told us to delete them?
@goodgamershow6505
@goodgamershow6505 3 жыл бұрын
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!
@richardlongshaw8079
@richardlongshaw8079 2 жыл бұрын
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
@richardlongshaw8079
@richardlongshaw8079 2 жыл бұрын
Found out the problem. Did not realise you had to click the 'rotate' icon that flashes up on the emulator device.
@PracticalCoding
@PracticalCoding 2 жыл бұрын
@@richardlongshaw8079 Oh I gotcha. Good to hear you got it working though!
@xcitintech7796
@xcitintech7796 3 жыл бұрын
Could you please show us how to add a history button that stores all previous expressions with their answers?
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@warriorforjesus2980
@warriorforjesus2980 3 жыл бұрын
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
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@toxino7866
@toxino7866 2 жыл бұрын
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?
@khushbuvadilakkad
@khushbuvadilakkad Жыл бұрын
I am working on calculator app. how to use rad and deg in sin,cos,tan functions in calculator? any idea?
@PracticalCoding
@PracticalCoding Жыл бұрын
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/
@sreelekshmi493
@sreelekshmi493 2 жыл бұрын
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
@gauravpandey5520
@gauravpandey5520 3 жыл бұрын
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
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@priyadharshininatarajan6580
@priyadharshininatarajan6580 Жыл бұрын
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??????
@FactMaven_
@FactMaven_ Жыл бұрын
bro trignometric or other functions are not working plz help
@hvl6906
@hvl6906 3 жыл бұрын
How to add permutation and combination functionality ?
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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
@hvl6906
@hvl6906 3 жыл бұрын
@@PracticalCoding okay.
@mohamadnourldine8745
@mohamadnourldine8745 2 жыл бұрын
Hello ..I have a problem when I run the project a problem appears ..transforms input file does not exist what should I do?
@PracticalCoding
@PracticalCoding 2 жыл бұрын
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.
@mohamadnourldine8745
@mohamadnourldine8745 2 жыл бұрын
@@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
@vyshnavprasannakumar3610
@vyshnavprasannakumar3610 3 жыл бұрын
How to develop attendance app teachers and students ?
@wwedebates1411
@wwedebates1411 2 жыл бұрын
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
@PracticalCoding
@PracticalCoding 2 жыл бұрын
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
@lalbahadursamanta8820
@lalbahadursamanta8820 2 жыл бұрын
Hello sir If I write this type of exp (4×4)(4+3) in this app it's showing error??? Please check it
@PracticalCoding
@PracticalCoding 2 жыл бұрын
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!
@lalbahadursamanta8820
@lalbahadursamanta8820 2 жыл бұрын
@@PracticalCoding ok😊
@lalbahadursamanta8820
@lalbahadursamanta8820 2 жыл бұрын
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
@PracticalCoding
@PracticalCoding 2 жыл бұрын
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
@supriyap8841
@supriyap8841 3 жыл бұрын
When I try using log(5) or log of some number i get ans as NaN
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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"
@satyajitbarick5031
@satyajitbarick5031 3 жыл бұрын
1st of all thanks for teaching so amazingly.... but Log button is not working.... It always give output "NaN"
@PracticalCoding
@PracticalCoding 3 жыл бұрын
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/
@satyajitbarick5031
@satyajitbarick5031 3 жыл бұрын
@@PracticalCoding now it works fine.... Thanx for replying so quick
@PracticalCoding
@PracticalCoding 3 жыл бұрын
@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"
@user-xz4xu4ni5r
@user-xz4xu4ni5r 3 жыл бұрын
sry but I can’t find these scientific calculating strings in your github...
@PracticalCoding
@PracticalCoding 3 жыл бұрын
Go to this link and scroll down just a little bit and the strings should be there github.com/Practical-Coding3/ScientificCalculator
@user-xz4xu4ni5r
@user-xz4xu4ni5r 3 жыл бұрын
@@PracticalCoding Well I can find the basic strings and colors but miss the scientific ones like tan, cos .
@PracticalCoding
@PracticalCoding 3 жыл бұрын
@@user-xz4xu4ni5r Ohhh that's my bad. Never added those string to it. I just updated the readme file with those strings
@user-xz4xu4ni5r
@user-xz4xu4ni5r 3 жыл бұрын
@@PracticalCoding thx! :)
@intanpurnamamamangkai9538
@intanpurnamamamangkai9538 3 жыл бұрын
there is no simbol Degree minute second
@intanpurnamamamangkai9538
@intanpurnamamamangkai9538 3 жыл бұрын
or how to convert Decimal degree To degree minute second like complete scientific calculator, thank You
How to make a scientific calculator in Android Studio 2021 | Part 3
25:38
How to make a scientific calculator in Android Studio 2021 | Part 2
17:58
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 99 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 24 МЛН
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 130 М.
How to make a Tic-Tac-Toe app in Android Studio | Part 6
15:09
Practical Coding
Рет қаралды 10 М.
How to Build a Calculator with Jetpack Compose - Android Studio Tutorial
43:24
How to make a Calculator in Android Studio | 2024
21:24
Easy Tuto
Рет қаралды 248 М.
HARD INDIAN Olympiads Trick | No Calculator Allowed | Can You Try ?
9:09
Learn with Christian Ekpo
Рет қаралды 108
How to make a calculator in Android Studio 2020 | Part 1
15:38
Practical Coding
Рет қаралды 157 М.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 462 М.
Video Backgrounds in Android Studio
14:08
Jonathan Ingram
Рет қаралды 22 М.
Intel's CPUs Are Failing, ft. Wendell of Level1 Techs
23:59
Gamers Nexus
Рет қаралды 390 М.
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
0:36
SOFIADELMONSTRO
Рет қаралды 12 МЛН
Сумасшедший бассейн с волнами в Китае
0:16
Короче, новости
Рет қаралды 10 МЛН
DESAFIO IMPOSSÍVEL #trending
0:15
O Mundo da Ágata
Рет қаралды 14 МЛН
Wonderful street food making skill
0:25
Fruit University
Рет қаралды 98 МЛН
Laughing is good 🥰🥳
0:41
Ben Meryem
Рет қаралды 29 МЛН
🤷🏻‍♂️Dad cheated in a game with his son😈😁
0:41
BorisKateFamily
Рет қаралды 6 МЛН