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

ความคิดเห็น • 36

  • @nenojay6832
    @nenojay6832 6 ปีที่แล้ว +3

    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.

  • @periclesradael
    @periclesradael 6 ปีที่แล้ว

    The best TH-cam tutorial.
    O melhor tutorial do TH-cam.

  • @kimsann7372
    @kimsann7372 6 ปีที่แล้ว +3

    Could you do about designing interface?
    Your tutorials really help me to develop android app

  • @user-sp3mx7ck2v
    @user-sp3mx7ck2v 6 ปีที่แล้ว +2

    I really love his tutorial, deserved to call professor ohohoh

  • @akompongeric4883
    @akompongeric4883 5 ปีที่แล้ว

    Wow l just love this tutorial it is very helpful. Thanks very much

  • @wondwossengebreab5178
    @wondwossengebreab5178 6 ปีที่แล้ว

    Thank you !

  • @deepankardey5935
    @deepankardey5935 6 ปีที่แล้ว

    good work!!

  • @lolikawaii5865
    @lolikawaii5865 6 ปีที่แล้ว +1

    It works but crashes on my Android 5.1 when I try to perform operations on number/s with dot after pressing equals button.

  • @basem902
    @basem902 6 ปีที่แล้ว

    thanks

  • @albertjjimenezp
    @albertjjimenezp 5 ปีที่แล้ว +1

    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

  • @dimitridoroshko
    @dimitridoroshko 5 ปีที่แล้ว +1

    What kind of theme is that? Seems like it's the dark theme, but modified.

  • @robertbalassan
    @robertbalassan 6 ปีที่แล้ว

    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.

  • @Sniperfuchs
    @Sniperfuchs 6 ปีที่แล้ว +2

    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.

    • @ibrahimfares9530
      @ibrahimfares9530 3 ปีที่แล้ว

      I have the same problem, how you solved it?

  • @debrajmaji1563
    @debrajmaji1563 4 ปีที่แล้ว +1

    If i type 3+.3 then the app is crashed. Please make a video for fixed this problem.

  • @larabatech1200
    @larabatech1200 6 ปีที่แล้ว

    amazing !

  • @seylannaidoo8929
    @seylannaidoo8929 5 ปีที่แล้ว +2

    The previous videos were much easier to understand and follow :(

  • @edrivenapps5454
    @edrivenapps5454 6 ปีที่แล้ว

    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.

  • @GrizzleeSanctus
    @GrizzleeSanctus 6 ปีที่แล้ว +1

    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 :(

    • @albertjjimenezp
      @albertjjimenezp 5 ปีที่แล้ว

      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

  • @hunterhalstrom
    @hunterhalstrom 6 ปีที่แล้ว +3

    I would suggest slowing down a bit.

  • @codekotlin1280
    @codekotlin1280 6 ปีที่แล้ว

    sir one calc made which studio android or xamarin

  • @yourexecutioner3210
    @yourexecutioner3210 4 หลายเดือนก่อน

    все круто мужик спасибо тебе выручил благослови тебя господь

  • @user-sk1uo1ie9z
    @user-sk1uo1ie9z 6 ปีที่แล้ว

    can complete this video with the whole functions like sin cos tan pi and others

  • @analie1372
    @analie1372 2 ปีที่แล้ว

    does this have mdas?

  • @PranavKumarG
    @PranavKumarG 6 ปีที่แล้ว

    Does the app has BODMAS operator precedence?

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว

      +Pranav Kumar yup

  • @jaistar2364
    @jaistar2364 6 ปีที่แล้ว

    i unable to use (Resource.Id.calculator_text_view); because it is not allowing me to type resource.Id

    • @TamimProduction
      @TamimProduction 6 ปีที่แล้ว

      Hi! write copy this : calculatorText = FindViewById(Resource.Id.calculator_text_view);

  • @peterszilagyi6712
    @peterszilagyi6712 4 ปีที่แล้ว

    My application dont work. :/

  • @KhoJee17
    @KhoJee17 5 ปีที่แล้ว

    why can't I run the app, I've done every single thing you've said, why is this?

    • @kevinromero8813
      @kevinromero8813 5 ปีที่แล้ว

      what does it tell you when you try running it?

  • @ninja_wolf-9k330
    @ninja_wolf-9k330 6 ปีที่แล้ว

    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) {}
    }

    • @ResoCoder
      @ResoCoder  6 ปีที่แล้ว +1

      Hello, would this actually work? You're creating the layout programmatically and such... May I ask what programming language is this written in? Javascript?