Android Calculator App Tutorial E02 - Java Code in Android Studio 3.6 (2020)

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

CodeWithMazn

CodeWithMazn

4 жыл бұрын

In this video tutorial, you will learn how to create a simple android calculator app using the latest android studio 3.6.3. You will learn how to create the logic behind the app using Java programming language. You will learn how to interact with the calculator's buttons and how to see the result of the calculations.
If you are curious on how to build the UI of the calculator app, please watch the first part of the app
• Android Calculator App...
🔴 Subscribe for more educational tutorials on CodeWithMazn channel!
Follow me on Instagram
/ codewithmazn
By the end of this video, you will learn
- How to create variable and arrays in Java.
- How to create functions in Java.
- How to interact with the UI components.
#Android #AndroidStudio #Java #Calculator #App

Пікірлер: 49
@krisairdancer4564
@krisairdancer4564 3 жыл бұрын
Excellent tutorial! Would be great to see more of these. Thanks!
@undagroundvangerzmusic
@undagroundvangerzmusic 2 жыл бұрын
THX a lot. Great JOB!!!!
@ishasaxena2231
@ishasaxena2231 2 жыл бұрын
For all those people whose app is crashing when pressed equals to. When writing the button code make sure you have space between the signs. i.e when you write the lines curr= curr + "space +space ". There won't be index out of bound error and the app won't crash.Worked for me.
@rexfestus2080
@rexfestus2080 2 жыл бұрын
Also having the same problem going to try it now thanks
@fasilaah
@fasilaah 3 жыл бұрын
really thank you very much Mr Mazn it is a wonder full clarification thankyou!!!!!!!!!!!!
@abbadkamel8839
@abbadkamel8839 3 жыл бұрын
that cool thank you i thought coding calculator would be simple but you showed a lot of amazing point thank you
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
I am glad that you liked it.
@parthgupta4850
@parthgupta4850 3 жыл бұрын
excellent tutorial I completed my first android app thanku very much
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
Glad it helped!
@harishg7640
@harishg7640 3 жыл бұрын
Very good explanation
@AyushVerma-hu2hg
@AyushVerma-hu2hg Жыл бұрын
Very nice explanation , for those who's app is getting crashed or closing while clicking on equal to button. You dont have given space in buttons like- " + " , " - " ," / " . Video is correct , correct these mistake and do same coding. Thank you! i hv a question too how to approach you?
@abirhudson8564
@abirhudson8564 3 жыл бұрын
You are nice.please upload more tutorials
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
Thank you for your comment. More tutorials are coming soon!
@prprblck_v2ab
@prprblck_v2ab 3 жыл бұрын
I am very much helped by your actions! Thanks! I have a question. 1 ) How can I get rid of the decimal point in the "result"? 2) After pressing equal, I can't continue to calculate. I want to know how to do it.
@srinidhih3051
@srinidhih3051 3 жыл бұрын
Same problem to me
@ZiaCodes
@ZiaCodes 4 жыл бұрын
Hey, bro, can you make a discount counter app in android studio, like enter the amount and enter a discount and show the result?
@marwaahmed4835
@marwaahmed4835 2 жыл бұрын
is that working just for one digit number?
@ameykulkarni1742
@ameykulkarni1742 Жыл бұрын
What is logic if we add modulo (%) operation too..
@navinprasandh
@navinprasandh 3 жыл бұрын
While executing equal to the app gets exiting and shows bug report can u help me why this happens?
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
What is your error? I think you are missing some castings. Make sure you cast your integers to strings properly and see if you still get the same error!
@parthgupta4850
@parthgupta4850 3 жыл бұрын
can you pls add a bit improvement in this app - 1* Adding limit to type digits (as they overflow when continuously typed) 2* Doing multiple operations at a time 3* Thanku very much for this app
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
Thank you for the suggestions! I will add it to my list! Stay tuned!
@parthgupta4850
@parthgupta4850 3 жыл бұрын
@@CodeWithMazn welcome. Thank u. Always
@mounisumer2043
@mounisumer2043 4 ай бұрын
having error in regex in equal button and d: in switch case
@pusangtamadpasalazy6823
@pusangtamadpasalazy6823 Жыл бұрын
the backspace for operator that will allow you to input it again is not working to me its same code as yours any idea sir?
@pusangtamadpasalazy6823
@pusangtamadpasalazy6823 Жыл бұрын
17:49 this is what i mean
@umeraslam3673
@umeraslam3673 3 жыл бұрын
Very well explained. but its working for 3+4 only. what if i want 3+4*7?
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
I am glad that you liked it. This is a simple calculator. If you want to perform many operators on a single calculation, then you need to check for operator precedence because multiplication and division comes before addition and subtraction. Also, you need to check if your input has any parenthesis so that you perform the calculation first. I believe there is a library for that where you can provide a string to a function and it will return you the result.
@Theworldofplay3
@Theworldofplay3 2 жыл бұрын
app is crashing when pressed equals to
@pixelsgamer4541
@pixelsgamer4541 3 жыл бұрын
After pressing equal the app getting crash..what to do
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
You might missing casting! String to Integer to calculate, then Integer to String to show the result.
@pixelsgamer4541
@pixelsgamer4541 3 жыл бұрын
@@CodeWithMazn but i have recheck all codes they are same as yours...so where is the error
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
@@pixelsgamer4541 Upload your source code to GitHub or Google Drive and send me the link so that I can check it for you.
@pixelsgamer4541
@pixelsgamer4541 3 жыл бұрын
@@CodeWithMazn okk
@pixelsgamer4541
@pixelsgamer4541 3 жыл бұрын
@@CodeWithMazn drive.google.com/drive/folders/1KXkiNTOqfLhfbXtnnMUtQkQ4B4dl5PeQ?usp=sharing
@rennielosabel8849
@rennielosabel8849 3 жыл бұрын
i think there's someone who has a same problem like me, when i calculating the app it crash. what should i do mr mazn ?
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
What type of error do you get when the app crashes? make sure of casting when you click on equal button
@rennielosabel8849
@rennielosabel8849 3 жыл бұрын
@@CodeWithMazn at fitst, it just crashed without notice but if you do it again it says that (application name)+keeps stopping, i just did what you write on your java. thanks mr mazn
@danielcorreia3312
@danielcorreia3312 3 жыл бұрын
@@rennielosabel8849 I have the same problem did you manage to solve?
@pusangtamadpasalazy6823
@pusangtamadpasalazy6823 Жыл бұрын
@@rennielosabel8849 same prob did you solve it?
@pusangtamadpasalazy6823
@pusangtamadpasalazy6823 Жыл бұрын
@@danielcorreia3312 same prob did you solve it?
@rutvijbhesaniya9892
@rutvijbhesaniya9892 3 жыл бұрын
By clicking is equal to the apps crash
@rutvijbhesaniya9892
@rutvijbhesaniya9892 3 жыл бұрын
java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
@earnknowledge8019
@earnknowledge8019 3 жыл бұрын
dark mode is not perfect plz let it with light
@CodeWithMazn
@CodeWithMazn 3 жыл бұрын
This was my first video tutorial on my channel. In my recent tutorials, I am using light background with larger font size!
@gallardomcalleinmonsalve747
@gallardomcalleinmonsalve747 3 жыл бұрын
send code plss
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 98 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 49 МЛН
Calculator App - Android Java
28:09
Dr. Parag Shukla
Рет қаралды 73 М.
How to Make a Tic Tac Toe Game in Android [Java 2020]
39:31
CodeWithMazn
Рет қаралды 60 М.
How to make a Calculator in Android Studio | 2024
21:24
Easy Tuto
Рет қаралды 251 М.
Java calculator app 🖩
34:36
Bro Code
Рет қаралды 415 М.
Navigation Component in Android Studio - Part I
15:05
CodeWithMazn
Рет қаралды 22 М.
Learn Kotlin in 12 Minutes
12:01
Rahul Pandey
Рет қаралды 316 М.
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН