How to make a Calculator in Android Studio | 2024

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

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

  • @EasyTuto1
    @EasyTuto1  2 года назад +28

    implementation 'com.faendir.rhino:rhino-android:1.5.2'

    • @melanialeonelli5154
      @melanialeonelli5154 2 года назад +1

      where?

    • @EzaZigzag
      @EzaZigzag 2 года назад +1

      why my number button keypad background not change when i switch to dark mode ? thank you

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

      implementation 'com. faendir. rhino:rhino-android:1.5.2'

    • @m5553
      @m5553 Год назад +3

      hi
      it is not working
      please help

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

      @@m5553 did you already sync your gradle?

  • @raghavkr2746
    @raghavkr2746 Год назад +52

    "Say hello to this hello world and delete it", That was smooth af!!💫💫

  • @emmanuelreuven7350
    @emmanuelreuven7350 2 года назад +17

    You are awsome, thank you.
    It was so easy to do this with your explanation.
    I managed to finish it from scratch in 2-3 hours, including finding myself installing Android Studio and the Emulator.
    Thank you so much.

  • @alexeymatveev9031
    @alexeymatveev9031 2 года назад +5

    Thank you. There are minor problems, like if keeping pressing AC it goes below 0, but this is even better to solve as homework. Thank you very much!

    • @bobbygraphics
      @bobbygraphics 2 года назад +2

      Change if statement to while..so while ac is above 0. It must clear

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

      @@bobbygraphics Thanks a lot. May be you can give me some heads up about the hardware requirements? I've set aside Android because it took like 5 minutes to recompile after every minor change. What is the preferred laptop configurations for this? I have MacAir with 8GB and I suspect there is something wrong about it not with configuration.. It should not be that demanding I guess...🙄🙄

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

      @@alexeymatveev9031 I also have the same MacBook Air m1 base variant , and android studio is taking 3 gb of ram and the emulator is taking 5gb of ram and java is taking 1.5 gb of ram ! I don't know why it has such a high ram usuage!

  • @thebhagwabilla
    @thebhagwabilla 8 месяцев назад

    bhaiya your explanation is always the best among all the people. You own a huge respect and position in my android journey. ❤❤❤

    • @EasyTuto1
      @EasyTuto1  8 месяцев назад

      Thank you so much 😀

    • @Ilovedoingthingsthatidontknow
      @Ilovedoingthingsthatidontknow 3 месяца назад

      Did ur code worked ?? Mine giving error on adding dependcy..can u plz help me with this

  • @imanonymous02
    @imanonymous02 11 месяцев назад

    The way you explain it, this was easier than making maggi. 🙇

    • @EasyTuto1
      @EasyTuto1  11 месяцев назад

      Happy to hear that!

  • @mrigankadas6684
    @mrigankadas6684 2 года назад +35

    🤣🤣say hello to this hello world and delete it. Such a dominance over hello world programs.

    • @tesfamichaelalmaw
      @tesfamichaelalmaw 8 месяцев назад

      🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣

  • @q.w.e.r.t.y27
    @q.w.e.r.t.y27 10 месяцев назад

    u r literally god for me rn..u helped my finish my prject

    • @EasyTuto1
      @EasyTuto1  10 месяцев назад +1

      Thank you

    • @q.w.e.r.t.y27
      @q.w.e.r.t.y27 10 месяцев назад

      @@EasyTuto1 it is showing an error on 14:08 for me on the getText and the setText

  • @NehaMajithiya
    @NehaMajithiya 9 месяцев назад +1

    Project done thank you sir👍😊

  • @Siddharth_VividPlus
    @Siddharth_VividPlus Год назад +1

    I love you sir 💗💗💗💗💗
    Success hua
    So thank you so much ❤️🙏
    Gurudev 😊😊😊😊

  • @mesopotamian97
    @mesopotamian97 2 года назад +8

    For those who have a problem with backspace, try this code. It works for me.
    if(buttonText.equals("C")
    {
    if(dataToCalculate.length() > 0)
    {
    StringBuilder sb = new StringBuilder(solutionTv.getText());
    sb.deleteCharAt(solutionTv.getText().length()-1);
    dataToCalculate = sb.toString();
    solutionTv.setText(dataToCalculate);
    resultTv.setText(dataToCalculate);
    }
    return;
    }

  • @ZTechTutorials
    @ZTechTutorials 2 года назад +1

    kiya bat hay. buht hee umda.. thanks.

  • @ScaryBeats777_montage_creator
    @ScaryBeats777_montage_creator 2 года назад +7

    My PC not accepting 'JavaScript ' keword showing error at time of importing in main activity
    Plzz reply...

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

    THANK YOUUUU because of this video i understood all the basic concepts of android studio!
    keep making content like this! i love it.

  • @visheshdahiwale748
    @visheshdahiwale748 2 года назад +1

    Thank you brother... the way of yours teaching is very simpler....

  • @knightwor
    @knightwor 2 года назад +2

    nice bother keep growing ☺️👍

  • @dhruvsharma5786
    @dhruvsharma5786 11 месяцев назад

    Thanks sir 🙏

  • @YogeshJangid986
    @YogeshJangid986 2 года назад +1

    Hi, First of all thank you for creating this project. I downloaded the project and tested. It has some bugs, When we minus 100-100 = It's giving wrong value as well as % isn't working. Please check once.

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

    What could be the problem because when I open the app and click any button, an error message appears saying "App has stopped".

    • @jampasemp1186
      @jampasemp1186 8 месяцев назад

      U have to declare ur activity in the androidManifest

  • @zo0oi_574
    @zo0oi_574 2 года назад +2

    Very nice
    Keep going👍🏻

  • @Shashank-pu1qo
    @Shashank-pu1qo Год назад +6

    Import org. Mozilla. JavaScript. Context... Giving me error😭

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

      Mai apka problem fix kar sakta hu
      Contact karo mujhe mere about section me Whats app no. hai

    • @Ilovedoingthingsthatidontknow
      @Ilovedoingthingsthatidontknow 3 месяца назад +2

      How did u solve that ... same thing giving me error

  • @trog-l5k
    @trog-l5k 2 месяца назад

    bro i learned so much fr thx

  • @ilmdotcom6767
    @ilmdotcom6767 Год назад +1

    thanks buddy.... but at last when you imported the libraries, it is a bit confusing for newbie..

  • @virtual_space399
    @virtual_space399 2 года назад +1

    Bro kya hum apne android phone se calculator app bna skte h ....

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

    Brother, where will you publish this on Playstore, please tell me.

  • @cheong34lol35
    @cheong34lol35 5 месяцев назад +2

    how do you change the libs thing in your gradle part

  • @jrstudzinski1986
    @jrstudzinski1986 11 месяцев назад

    Incrível! Parabéns pelo trabalho! Funcionou perfeitamente! Ganhou mais 1 inscrito brasileiro! 👍👍👍

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

      Muito obrigado pelo apoio entusiasmado! Fico feliz em saber que você gostou e que agora tenho mais um assinante brasileiro incrível! 🎉 Seja muito bem-vindo à comunidade! Estou aqui para ajudar no que precisar. 😊

  • @history_funy
    @history_funy 2 года назад +1

    Verry good and easy following speech !!

  • @KhushiChaubey17
    @KhushiChaubey17 16 дней назад

    sir new implementation library?

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

    Thank you for this toturial i hope its work in my compiler when i code this later

  • @Pluto-qi9gh
    @Pluto-qi9gh 6 месяцев назад

    Just completed this tutorial. Running android studio jellyfish. I used java language but was forced to use kotlin dsl. there were quite a few changes that needed to be made. However, I had chat gpt 4.0 correcting the errors in the code along the way. But, I got it to work. Thanks again for a great video. Only suggestion from me would be to slow down just a little when you complete a few lines of code to make pausing the video a little easier .

  • @KJ7JHN
    @KJ7JHN 7 месяцев назад

    @EasyTuto1 do you have a video that uses a keyboard listener?

  • @theconfusingriddle
    @theconfusingriddle 2 года назад +4

    Brother I am facing problem in solution Text View it's not getting clear😞😞

  • @moubiswasEdits
    @moubiswasEdits 5 месяцев назад

    Thank you for the tutorial

  • @asadbekaminboyev3311
    @asadbekaminboyev3311 2 года назад +1

    The implementation in Gradle is working?

  • @soylent0815
    @soylent0815 2 года назад +8

    Any idea how to keep the exact precision when calculating? For example 6.1 multiplied by 3 results in 18.29999999999997. I guess it has something to do with the floating point numbers, but I can't figure out how to handle this problem in the code from this video... Apart from that - great tutorial! 👍

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

      second that

    • @Kamal-cn6kk
      @Kamal-cn6kk Год назад +4

      Use BigDecimal class rather than floating point numbers to get accurate values.

    • @TANISHQTHUSE
      @TANISHQTHUSE 10 месяцев назад +1

      I once saw in a tutorial for addition of dollar. This error occurs because computers are poor in storing decimal number in form of binary. Convert 6.1 to 61 and 3 to 30. Multiply them , divide by 10. This should solve the issue. Simple and easy solution. Else you can always use relevant libraries in the language you are using.

  • @HussnainAli-so4xq
    @HussnainAli-so4xq 5 месяцев назад

    Awesome 👍

  • @j.m2312
    @j.m2312 Год назад +1

    there are errors in main. activity. java file.
    its my first app and i can't solve it.
    i need help sir 🥺 plz

  • @samirmortada2097
    @samirmortada2097 Год назад +1

    Brother can u please make the code pdf or anything inorder to make copy and paste without wasting time thank you

  • @GhOsTs_369
    @GhOsTs_369 3 месяца назад

    Sir why is my 2nd linear layout overlapping with the first one ?

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

    Thanks bro
    I have created it for same like your work but the plus button just works other all not working like minus multiplay divide, please guide me how to solve it...

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

      Something is wrong in the code.
      Try resolving. ❤️

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

    ❤❤❤❤❤❤thank you great work

  • @priyas_lifestyle09
    @priyas_lifestyle09 4 месяца назад +1

    Nice
    But app download kese kre?

  • @someone7307
    @someone7307 2 года назад +1

    why the implementation 'com.faendir.rhino:rhino-android:1.5.2' didn't work? it has a new one now?

  • @axelmedina8834
    @axelmedina8834 2 года назад +1

    Can someone help me? My code does not have errors but the text view does not shows any number when i push any materialbutton

  • @MichaelLuisFelasol
    @MichaelLuisFelasol Месяц назад

    its 2024 and my gradle is language is kts is there a way you can change it to the one you used?

  • @lenovopc4257
    @lenovopc4257 Год назад +1

    non-static method 'setoptimizationlevel(int)' cannot be referenced from a static context .....this error show! What will I do

  • @imhassan4119
    @imhassan4119 Год назад +1

    Please sir how can I import JavaScript?

  • @ralphsantiago850
    @ralphsantiago850 2 года назад +4

    the part of import org.mozilla.javascript.Context;
    import org.mozilla.javascript.Scriptable; is not working for me

  • @syedfaisal417
    @syedfaisal417 Год назад +1

    Hi brother I am from Pakistan, When I press C button for multiple times and at the end when there is no value and I press C button then the application gets close automatically and I see the library name of JavaScript in Text view. Please provide the solution. Thanks

    • @EasyTuto1
      @EasyTuto1  Год назад +1

      Yeah you can just add condition when there is no value.

  • @PhoenixYT00223
    @PhoenixYT00223 Год назад +1

    error showing during javascript writing??

  • @happymiki
    @happymiki 2 года назад +2

    Nice brother 🎉 😍 😊

  • @history_funy
    @history_funy 2 года назад +2

    Well done your tutorial.
    There is one error.
    If you keep pressing the "C" key,
    an error called org.moailla.javascript.Undefined@o... will occur at the end.
    What could be the cause?

    • @diras1127
      @diras1127 Год назад +1

      that has two reasons, one is using substring(0,0) may cause crash(so you need to change the "C" part, add an if statement), and the other is that setText("") does not cause "ERR", so you need to add something to the if statement in the filling resultTv part

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

      @@diras1127 please explain in plain english

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

      same error . how to fix

    • @Sahil-jx2to
      @Sahil-jx2to Год назад

      ​@@atulthakur6928 were you able to solve it? I encountered the same.......solved to some sort but got another one.

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

      ADD THIS In the case of "C"
      else if (button_text.equals("C")) {
      if(datatocalculate.length()==1)
      {datatocalculate="0";}
      else {
      datatocalculate = datatocalculate.substring(0, datatocalculate.length() - 1);}
      }
      it will work😇

  • @bromonsterking
    @bromonsterking 2 года назад +1

    Really you are great, and thank you ❤️

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

    Why u use a relative layout at starting 0:55 ?

  • @nwcoder
    @nwcoder 2 года назад +1

    Please upload next part on this calculator app scientific mode...

  • @moinyesin
    @moinyesin 2 месяца назад

    The parentheses doesn't work... And there is a problem where it shows 55 when you click 5=5(nn for n=n)...another problem is it shows Err if i press 5+= (n+=)

  • @jonthamastersmooth
    @jonthamastersmooth Год назад +1

    Do you have a version for doing this in Kotlin?

  • @Tiwari.A
    @Tiwari.A 2 месяца назад

    By doing the same only - and + operations are working what more to do for * and /

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

    I have a problem, when I try it on the virtual device, the C button and others do not work and the app closes many times

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

    Backend code is not working. Any button not work.please help me sir....

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

    Thank you so much.
    But, I have a problem. Clicked C button and crash the app when solutionTv is "Empty" .
    What is the solution?

  • @babraksohail6965
    @babraksohail6965 2 года назад +4

    Brother Could You Explain in depth About Rhino implementation u did in your project like the purpose of using script, context.setOptimizationLevel (-1) , In short, the whole portion of try. Eagerly Awaiting for your reply !
    thanks :) Love Your Work :)

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

      Did you get an explanation?

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

      @@felixmaundu3891 no brother

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

      the function gets values between -1 to 9 and what it means is that higher levels of optimization can improve the performance of the JavaScript code but may also increase the time it takes to compile the code. So for this calculator simple app it really doesn't matter

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

      Same problem

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

      Please reply

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

    Bro my all functions are working good but while turn on the dark mode it will not converting in dark theme properly

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

    nandrigal kodi annaa

  • @heterawasmapreha
    @heterawasmapreha 2 года назад +1

    How did the app theme change in dark mode? Isn't working for me

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

      Do you have an answer yet?

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

      Turn dark mode in your phone.
      It will automatically turn on.

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

      @@EasyTuto1 It works on Redmi. But when I tried on Pixel Pro and Samsung S22 Ultra, it ends up with a really ugly coloring... Any ideas abt this?

  • @catalintudoreanu8880
    @catalintudoreanu8880 Год назад +1

    thanks man, you good dawg

  • @docps9591
    @docps9591 2 года назад +2

    You are amazing

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

    Bro, I have added my icon to app, if I create normal apk and install it will show icon, but I have published it to play store but if I download from play store it showing green color Android default icon pls help me to solve

  • @saiungarala6686
    @saiungarala6686 2 месяца назад

    How to add that line into dependencies

  • @jejesan9297
    @jejesan9297 9 месяцев назад

    please may i know the name of your programming tools?

    • @EasyTuto1
      @EasyTuto1  9 месяцев назад

      Its Android Studio.

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

    bro while i have finished the calci there is a problem occuring like double no are coming while pressing any button can u help me bro

  • @haiqaarshad3474
    @haiqaarshad3474 11 месяцев назад

    can you explain whats going in gradle app ???

    • @swadeshicreator9717
      @swadeshicreator9717 11 месяцев назад +1

      Basically we asked gradle to add that library to our project which was not by default present for our use.

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

    It's showing "Err" Whenever I'm trying to use an operator... Plz help

  • @AndreasWegerer-kz1sg
    @AndreasWegerer-kz1sg Год назад

    How i can Duplikate the Buttons? Layout?

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

    help me out im trying to copypaste and they keep overlaping each other
    how do I get the four buttons below one another

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

    Thank you bro

  • @Abbaskhan-qv5xd
    @Abbaskhan-qv5xd Год назад +1

    Multiply option is not working

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

    If the result actually has .0 in the value it will also be replaced by empty string ?

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

      no, not the whole result. Only .0 will get replace by the empty string

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

    Thank you so much sir

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

    Sir please resolve my problem
    If we run the app then it will not run it shows a msg that ''Unfortunately Calculator'' has stopped.

  • @sakibtalukqder
    @sakibtalukqder 9 месяцев назад

    too much helpful,,

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

    Good one 👍👍

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

    Bro you haven't explain dependency not full but at least you should give some over
    View and the working also...

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

    Sir, How can i use these calculator in my android 11

  • @muneesff5549
    @muneesff5549 2 года назад +1

    bro Ac button was not working bro what can i do bro

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

    Sir (sourceName: "Javascript", lineno: 1, securityDomain: null)
    Es line mai error aa rahi hai?
    solution plz

  • @Prncgr8
    @Prncgr8 8 месяцев назад

    When I try put paste linear layout nothing comes 😢 if I try manual it doesn't work

    • @EasyTuto1
      @EasyTuto1  8 месяцев назад

      Check correctly

  • @frennardenddy8763
    @frennardenddy8763 9 месяцев назад

    HOW MUCH I NEEDED YOU FOR THE COLLEGE X'D

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

    Hello @EasyTuto1 is there a way to change the resultTv? because once u choose 2 numbers it adds automatically

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

    Awesome 👍😊

  • @Aakash983
    @Aakash983 4 месяца назад

    How to open in Design Model?

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

    Hello, you didn't solve the dot button it concatenates more than one

  • @LancineDiare-ww8xn
    @LancineDiare-ww8xn 8 месяцев назад

    Thank you a lot.

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

    bro. my C button is not working and showing as pressing it.

  • @ailekzavy
    @ailekzavy Месяц назад

    Thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.....How can i format the numebers in EditText?

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

    My Button Colour Is Not Changing Please Help

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

    Thanks bhai ❤🎉

  • @mikebledig7208
    @mikebledig7208 2 года назад +1

    Very interesting and easy to follow. Can we have some more? Please?

  • @-Poojitha-sn3vt
    @-Poojitha-sn3vt 2 года назад +1

    When i clear all by using C
    If nothing is there ,then i click C
    Im getting an error
    Will you please give me sol for that

    • @VikasKumar-wz9ju
      @VikasKumar-wz9ju 2 года назад +2

      same here
      please help us solve this issue
      In a clearscreen if i press "C"
      it displays:
      org.mozilla
      .javascript
      .Underfined@0

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

      @@VikasKumar-wz9ju Same :(

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

      you need to put a condition so the getResult method won't accept null values. Here's the code that fixed mine:
      if(dataToCalculate.length() > 0){
      finalResult = getResult(dataToCalculate);
      }
      meaning the getResult method won't accept null value when you clear the dataToCalculate variable