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
  • ХоббиХобби

Комментарии • 110

  • @PracticalCoding
    @PracticalCoding  3 года назад +1

    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

  • @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!

  • @neoslife2493
    @neoslife2493 3 года назад +4

    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 года назад +1

      Thanks! Always good to hear that people are liking the videos I put out

  • @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...

  • @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.

  • @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 года назад +2

    Best explaination!! I completed in 12 hours. Feeling extremely happy.
    Thanks a ton!!!!!!
    keep doing many such videos ☺☺

  • @senorchampinon9114
    @senorchampinon9114 2 года назад

    Thank you so much! excellent work!💯

  • @mido03
    @mido03 2 года назад

    Amazing series I learned so much!
    Please continue making those awesome videos.

  • @creamyturtle69
    @creamyturtle69 3 года назад +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 года назад +1

      How you've done it?

  • @Reueldejoya
    @Reueldejoya 2 года назад

    Thank you very much sir! You help me to finish my Midterm project.

  • @bhargavjoshi6465
    @bhargavjoshi6465 3 года назад

    The whole series was awesome... Thanks a lot...

  • @that_soumen
    @that_soumen 2 года назад

    we will support you
    carry on💕💕💕

  • @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 😁🤗

  • @riofransiskussimanjuntak_0601
    @riofransiskussimanjuntak_0601 Год назад

    Thank you for your great explanation

  • @evelina_abilova
    @evelina_abilova 2 года назад

    Thank you so much, greetings from Belarus!

  • @sumitadhikari7617
    @sumitadhikari7617 2 года назад

    Your video always helps me.. Thank you...

  • @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 года назад +1

      Thanks! Love hearing that people are enjoying the video I put out

  • @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💯

  • @bhaweshmadhwani1801
    @bhaweshmadhwani1801 3 года назад

    Thanks a lot for these amazing tutorials:)

  • @ProGamer2017
    @ProGamer2017 2 года назад

    Thank you so much

  • @manishstar11
    @manishstar11 2 года назад

    Thankyou so much...

  • @myth6628
    @myth6628 10 месяцев назад

    thank you very much

  • @samuelefendipurba6314
    @samuelefendipurba6314 3 года назад

    Thanks broo..

  • @totajo1267
    @totajo1267 2 года назад

    you really make amazing videos , I made the app and it was really awsome .

  • @tallerfrodo1262
    @tallerfrodo1262 3 года назад

    thank you!!!!!

  • @gameandelectronic8369
    @gameandelectronic8369 3 года назад

    This video is awesome, i like your video

  • @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 года назад +1

      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

  • @yanpepik3130
    @yanpepik3130 3 года назад

    Maaaaan!! Thanks a lot!!

  • @yazanmahfod8533
    @yazanmahfod8533 3 года назад

    Thank you very much, your way of explaining things is amazing. Well done 👍👍😁

    • @PracticalCoding
      @PracticalCoding  3 года назад +1

      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 года назад +1

      @@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

  • @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.

  • @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

  • @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 года назад +1

      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

  • @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??

  • @noureldin1774
    @noureldin1774 6 месяцев назад

    its so great videos playlist , i think a bad scenario for decimalBTNPush for one use for every number not like this (.........)

  • @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 года назад +1

      @@richardlongshaw8079 Oh I gotcha. Good to hear you got it working though!

  • @xcitintech7796
    @xcitintech7796 2 года назад

    Could you please show us how to add a history button that stores all previous expressions with their answers?

    • @PracticalCoding
      @PracticalCoding  2 года назад

      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

  • @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 года назад +1

      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!

  • @warriorforjesus2980
    @warriorforjesus2980 2 года назад

    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  2 года назад +1

      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/

  • @vyshnavprasannakumar3610
    @vyshnavprasannakumar3610 3 года назад

    How to develop attendance app teachers and students ?

  • @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

  • @tarsemlal1720
    @tarsemlal1720 Год назад +2

    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

  • @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??????

  • @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

  • @hvl6906
    @hvl6906 2 года назад

    How to add permutation and combination functionality ?

    • @PracticalCoding
      @PracticalCoding  2 года назад

      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 2 года назад

      @@PracticalCoding okay.

  • @FactMaven_
    @FactMaven_ Год назад

    bro trignometric or other functions are not working plz help

  • @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 года назад +1

      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😊

  • @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 года назад +1

      @@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

  • @supriyap8841
    @supriyap8841 3 года назад

    When I try using log(5) or log of some number i get ans as NaN

    • @PracticalCoding
      @PracticalCoding  3 года назад +2

      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"

  • @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 года назад +1

      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

  • @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