Making My First Android App: Mera Calculator

Made a tiny calculator in a jiffy. Nothing fancy in here to see. Just seeing how the platform works ๐Ÿ˜‰

Mera Android CalculatorMaking the interface:-

Adding Buttons:-

All you have to do is drag the item you want to the specific place you want them to be like in VB.NET

Android SDK on Eclipse User Interface

Adding function call to the buttons:-

Switch from the graphical view to xml view. Add this attribute in the buttons inserting the name of the function to be called.

XML view of Android buttonI added this attribute in all buttons.

Writing the Back-End:-

The number button handlers:-

Now we create methods in java file found in /src folder. Each button when pressed will concatenate the number or arithmetic operation they do and display it in a TextView named “textView1”.

The calculate function:-

We get the string in “textView1” and try to parse it in a function to get a result. The result is then casted as string then the TextView which will display the answer finally displays it ๐Ÿ™‚

The program is very buggy and cannot calculate e.g. + and – at the same time. But at least i got a program running in Android ๐Ÿ˜›

Here are the source codes. The .apk file is found in bin folder: MeraCalculator

“made in moris”. Worst branding ever!!!

made in moris

Have they gone crazy? This is total bullshit!

Inside jokes are cool between friends. Only insiders can appreciate that. We cannot use a local word in a branding that will represent Mauritius in the world.

Foreigners know the word Mauritius from maps, dictionaries etc. Mauritius was branded “Mauritius : C’est un plaisir“. Would they be able to know “moris” is actually Mauritius? We’re wasting our marketing resources here. Y U NO MARKET MAURITIUS IN A CONSISTENT WAY!?

Hey! Would you go to a wedding in shorts and beachwear stuffs?

Ofcourse you can! But would you? Is this the image they want others to have about us? That we are retards? We don’t know the context. We mix English with some other language?

Made in Mauritius is cool enough. I’m proud of my country!

 

Read also: Made In Moris?!? by Avinash Meetoo