Make a CALCULATOR App with Xamarin Android #2 - Coding Calculator Logic in C#
Вставка
- Опубліковано 14 вер 2017
- Simplify your problems with One Calc - simple scientific calculator made with YOU in mind: play.google.com/store/apps/de...
Learn how to code the logic of this simple calculator in C#. It's easier than you think and it is certainly a lot of fun!
Divide and multiply characters: "÷×"
Get the code written in this tutorial: wp.me/p8jOJP-4y
Go to my website for more information, code examples and articles:
● resocoder.com
Follow me on social media:
● / resocoder
● / resocoder
One Calc Music:
"Surf Shimmy" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
creativecommons.org/licenses/b...
i love these xamarin and C# tutorials because i already know C# so i don't have to learn any extra unnecessary stuff to develop for android . And thank you for the tutorials.
The best UA-cam tutorial.
O melhor tutorial do UA-cam.
I really love his tutorial, deserved to call professor ohohoh
Could you do about designing interface?
Your tutorials really help me to develop android app
Wow l just love this tutorial it is very helpful. Thanks very much
Thank you !
It works but crashes on my Android 5.1 when I try to perform operations on number/s with dot after pressing equals button.
good work!!
Finally... It took me 40 minutes to figure out that I had set my target to android 8.0 when my phone I was using to debug is 7.1. It always gave me an exception that my ButtonClick method wasn't found and no Google search could help me in any way.
I have the same problem, how you solved it?
Greetings, can we use unity inside xamarin or vice versa? for example draw mapping routes from google maps api inside a game map in unity. I hope that someone can answer me. Have a nice day
if you start by pressing . app crashes. if you reach the memory limit for number length app crashes. if you randomly tap operator and numbers fast after a time the app crashes. probably those are not the only bugs. found them in 5 seconds after i built it on phone :)) the rest, works indeed exactly the same as the emulator works in the end.
What kind of theme is that? Seems like it's the dark theme, but modified.
thanks
I wish I would not have learned React-Native / Ionic / NativeScript before XM. Seems like A LOT of drama to get simple results. The speed of a XM app seems to be slightly faster....but takes 3x longer to code.
If i type 3+.3 then the app is crashed. Please make a video for fixed this problem.
amazing !
Thanks!
can complete this video with the whole functions like sin cos tan pi and others
thanks! Great tutorial. Can you help me? If click "." without any digit app will close, and any debuging don't help. I try make "If" to add numbers[index] = "0." then value == "." && numbers[index] == null in private void AddDigitOrDecimalPoint(string value) . But app close early :(
i added
if (value == "." && numbers[index] == null)
return;
just before because when csharp search if contains inside a null object throw an exception
Greetings from Colombia
i unable to use (Resource.Id.calculator_text_view); because it is not allowing me to type resource.Id
Hi! write copy this : calculatorText = FindViewById(Resource.Id.calculator_text_view);
does this have mdas?
The previous videos were much easier to understand and follow :(
I would suggest slowing down a bit.
Does the app has BODMAS operator precedence?
+Pranav Kumar yup
sir one calc made which studio android or xamarin
Xamarin.
все круто мужик спасибо тебе выручил благослови тебя господь
My application dont work. :/
why can't I run the app, I've done every single thing you've said, why is this?
what does it tell you when you try running it?
Hay bro anyone can do that so simple like this
//Called when application is started.
function OnStart()
{
//Create a layout with objects vertically centered.
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
//Create text label
txt = app.CreateText( "type a term!" );
txt.SetTextSize( 30 );
lay.AddChild( txt );
//Create text edit box
edt = app.CreateTextEdit( '', .5, -1, "Singleline" );
edt.SetOnChange( calculate );
lay.AddChild( edt );
//Add layout to app.
app.AddLayout( lay );
}
//calculate term
function calculate() {
//get term and remove all spaces
var term = edt.GetText().replace(/ /g, "" );
//try to calculate term and handle errors
try {
//handle empty term
if( term == "" ) txt.SetText( "type a term!" );
else txt.SetText( eval( term ) );
} catch(e) {}
}
Hello, would this actually work? You're creating the layout programmatically and such... May I ask what programming language is this written in? Javascript?