Create a Calculator App in Minutes - Android Studio Tutorial

Create a Calculator App in Minutes - Android Studio Tutorial

Codes Easy

1 год назад

79,722 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Tiana Domingos
Tiana Domingos - 21.11.2023 14:15

please how do i add square root and power

Ответить
Code Villain
Code Villain - 20.11.2023 17:34

@CodesEasy i am getting error like Constant expression required in the place of swith case

Ответить
Jahnavi Vaduguru
Jahnavi Vaduguru - 09.11.2023 19:10

which app

Ответить
mk6774
mk6774 - 06.11.2023 22:50

My code doesn't find view.getId() from the switch ,what should I do?

Ответить
manyala jagadeesh
manyala jagadeesh - 20.10.2023 11:02

great work

Ответить
Md.Ziaur Rahman
Md.Ziaur Rahman - 17.10.2023 17:40

how to show . 33 after divided
2 decimal place code pls

Ответить
Ka Ga
Ka Ga - 16.10.2023 22:46

sorry but my answers is not showing up in the textview

Ответить
Jehan Saren
Jehan Saren - 28.09.2023 10:29

Its very nice, but please don't rush the teaching, it's better to thoroughly explain each step for what and how it works. ❤

Ответить
Josh Palacio
Josh Palacio - 13.09.2023 16:50

Sir I'm getting this
Case R.id.btn

Ответить
The Dot-com Entrepreneur Forex & Business
The Dot-com Entrepreneur Forex & Business - 02.09.2023 02:27

Hello sir I'm having an error at the end saying constant expression expected 😢😢

Ответить
Prishab Manandhar
Prishab Manandhar - 28.08.2023 11:33

im having with the case step...

Ответить
Avneesh Tilwani
Avneesh Tilwani - 15.08.2023 14:23

instead of using switch you can use if-else conditions such as

@Override
public void onClick(View view) {
N1 = getIntFromEditText(editTextN1);
N2 = getIntFromEditText(editTextN2);
if(view.getId()== R.id.btn_addition){
textView.setText("Answer = " + (N1 + N2));
}
else if (view.getId()== R.id.btn_subtraction){
textView.setText("Answer = " + (N1 - N2));
}
else if (view.getId()== R.id.btn_multiplication){
textView.setText("Answer = " + (N1 * N2));
}
else if (view.getId()== R.id.btn_division){
textView.setText("Answer = " + ((float)N1 - (float)N2));
}

}
}

Ответить
AVNEESH TILWANI
AVNEESH TILWANI - 15.08.2023 14:19

Instead of using switch case you can use if-else conditions like this:
if(view.getId()== R.id.btn_addition){
textView.setText("Answer = " + (N1 + N2));
}
else if (view.getId()== R.id.btn_subtraction){
textView.setText("Answer = " + (N1 - N2));
}
else if (view.getId()== R.id.btn_multiplication){
textView.setText("Answer = " + (N1 * N2));
}
else if (view.getId()== R.id.btn_division){
textView.setText("Answer = " + ((float)N1 - (float)N2));
}

Ответить
Radhika Kapoor
Radhika Kapoor - 01.08.2023 11:10

Such a great tutorial for beginner. Really appreciate.
I am unable to download source code ,kindly help to get code for practice.

Ответить
Saurabh Gaming
Saurabh Gaming - 31.07.2023 06:18

Thanks sir for this video

Ответить
Abdul Rahman
Abdul Rahman - 02.07.2023 12:29

can i get thee complete code ??
front end and back end bothj ??

Ответить
muhammad asyraf
muhammad asyraf - 10.06.2023 18:00

hello sir thanks for sharing the education, i have question for you, why you use linear layout instead use constraint layout?
imo constraint layout more option for layout, thanks for answer

Ответить
autofast
autofast - 07.06.2023 21:32

i use it for my homework thanks❤

Ответить
Sergiu-Ionut Mogosan
Sergiu-Ionut Mogosan - 24.04.2023 19:54

How to resolve the error "Constant expression required" on case R.id.btn_add:?

Ответить
sonvena sushil
sonvena sushil - 24.04.2023 09:53

How to remove error
Case R.id.btn

Constant expression required

Ответить
Abhisar Agarwal
Abhisar Agarwal - 01.02.2023 19:50

Sir I am getting gradle sync error in Android studio how can I fix it pls tell I want to do Android development Also tell if I can do Android development in intellij idea pls

Ответить
Ajay Kumar
Ajay Kumar - 29.01.2023 20:38

sir mere pass error aa rha hai kase fix hoga plz btao

Ответить