{"id":31843,"date":"2019-10-31T21:43:27","date_gmt":"2019-10-31T18:43:27","guid":{"rendered":"https:\/\/prohoster.info\/blog\/sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet\/"},"modified":"2019-10-31T21:43:27","modified_gmt":"2019-10-31T18:43:27","slug":"sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/news\/sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet","title":{"rendered":"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/faaae0beaf023f1c11bb9102312fe429.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nN\u00eb k\u00ebt\u00eb artikull do t'ju tregojm\u00eb se si t\u00eb krijoni nj\u00eb aplikacion t\u00eb thjesht\u00eb p\u00ebr llogaritjen e bakshishit n\u00eb gjuh\u00ebn Kotlin. M\u00eb sakt\u00ebsisht, Kotlin 1.3.21, Android 4, Android Studio 3. Artikulli do t\u00eb jet\u00eb interesante, para s\u00eb gjithash, p\u00ebr ata q\u00eb po fillojn\u00eb rrug\u00ebtimin e tyre n\u00eb zhvillimin e aplikacioneve Android. Ai lejon t\u00eb kuptohet se \u00e7far\u00eb ndodh dhe si funksionon brenda aplikacionit. <\/p>\n<p>Ky kalkulator do t\u00eb jet\u00eb i dobish\u00ebm kur duhet t\u00eb llogariteni shum\u00ebn e bakshishit nga nj\u00eb grup q\u00eb ka vendosur t\u00eb kaloj\u00eb koh\u00eb n\u00eb nj\u00eb restorant apo kafene. Sigurisht, nuk t\u00eb gjith\u00eb dhe jo gjithmon\u00eb l\u00ebn\u00eb bakshish p\u00ebr kamarier\u00ebt, kjo \u00ebsht\u00eb m\u00eb shum\u00eb nj\u00eb tradit\u00eb per\u00ebndimore, por procesi i zhvillimit t\u00eb nj\u00eb aplikacioni t\u00eb till\u00eb \u00ebsht\u00eb gjithsesi interesant. <br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<blockquote><p><b>Kujtojm\u00eb:<\/b> <i>p\u00ebr t\u00eb gjith\u00eb lexuesit e \u00abHabra\u00bb \u2014 zbritje prej 10,000 rublesh p\u00ebr regjistrimin n\u00eb \u00e7do kurs Skillbox me kodin promovues \u00abHabr\u00bb.<\/i><\/p>\n<p><b>Skillbox rekomandon:<\/b> Kurs praktik <noindex><a rel=\"nofollow\" href=\"https:\/\/skillbox.ru\/agima\/?utm_source=skillbox.media&amp;utm_medium=habr.com&amp;utm_campaign=AGIMA&amp;utm_content=articles&amp;utm_term=kotlintips\">Mobilni zhvillues PRO<\/a><\/noindex>.\n<\/p><\/blockquote>\n<p>\nK\u00ebtu si duket aplikacioni gjat\u00eb funksionimit:<\/p>\n<p><img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/fa375744a4ca5d07667ec494db38648b.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nJu futni p\u00ebrqindjen e d\u00ebshiruar nga shuma totale, numrin e pjes\u00ebmarr\u00ebsve n\u00eb takim dhe merrni rezultatin \u2014 shum\u00ebn e bakshishit q\u00eb duhet t\u00eb lini.<\/p>\n<h3>T\u00eb fillojm\u00eb<\/h3>\n<p>\nInterfejsi i plot\u00eb i aplikacionit duket si m\u00eb posht\u00eb:<br \/>\n<img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/e95058f09c4a6c151b6c5500ae549c0e.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\n<img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/ac31c73ade24640078c76d71700de0b4.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nVeprimi i par\u00eb \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/lawreyios\/tipcalculator\/tree\/starter_project\">ngarkimi i baz\u00ebs s\u00eb projektit<\/a><\/noindex>. E hapim at\u00eb n\u00eb Android Studio 3.0 ose nj\u00eb version m\u00eb t\u00eb ri. Nd\u00ebrtojm\u00eb dhe ekzekutojm\u00eb projektin dhe shohim nj\u00eb ekran t\u00eb bardh\u00eb. Gjith\u00e7ka \u00ebsht\u00eb n\u00eb rregull, k\u00ebshtu duhet t\u00eb jet\u00eb.<\/p>\n<p><img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/f4e3361ddc45d56794cc5c7c36d8b206.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\n<img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/7828c10dcb3936eb095f5110094ea8bf.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nVeprimet e p\u00ebrdoruesit jan\u00eb shkruar n\u00eb projekt n\u00eb rend kronologjik, q\u00eb t\u00eb jet\u00eb e qart\u00eb. P\u00ebr ta par\u00eb at\u00eb hapim View -&gt; Tool Windows -&gt; TODO.<\/p>\n<p>Studioni projektin dhe hapni colors.xml p\u00ebr t'u vler\u00ebsuar paletat e ngjyrave. N\u00eb strings.xml \u00ebsht\u00eb vendosur t\u00eb dh\u00ebnat tekstuale (etiketat), nd\u00ebrsa n\u00eb styles.xml ka disa shabllone fontesh.<\/p>\n<h3>Zhvillimi i seksionit t\u00eb shpenzimeve<\/h3>\n<p>\nHapni activity_main.xml dhe shtoni kodin e m\u00ebposht\u00ebm n\u00eb LinearLayout (#1):<\/p>\n<pre><code class=\"kotlin\"><\/code><\/pre>\n<p>\nTani mund t\u00eb konfiguroni stilin e drejtoris\u00eb values ose t\u00eb luani me ngjyrat, duke p\u00ebrdorur <noindex><a rel=\"nofollow\" href=\"https:\/\/material.io\/tools\/color\/#!\/?view.left=0&amp;view.right=0&amp;primary.color=37474F\">instrumentin material.io<\/a><\/noindex>.<\/p>\n<p>Aktualisht projekti duket k\u00ebshtu:<\/p>\n<p><img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/ab47023cafd97fdbd171a9d9a1c35dd5.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i> Si\u00e7 e shihni, llogaritja e shpenzimeve b\u00ebhet mbi t\u00eb dh\u00ebnat q\u00eb p\u00ebrdoruesi fut. <\/i><\/p>\n<h3>Zhvillimi i seksionit t\u00eb faturave<\/h3>\n<p>\nShtoni kodin, i cili \u00ebsht\u00eb vendosur m\u00eb posht\u00eb, n\u00eb LinearLayout pas Seksionit t\u00eb Shpenzimeve (#2):<\/p>\n<pre><code class=\"kotlin\">&lt;! \u2014 TODO #3: Nd\u00ebrto Seksionin e Fatur\u00ebs \u2192\n \n\u2026<\/code><\/pre>\n<p>\nMbyllim LinearLayout pas list\u00ebs s\u00eb TODO-ve dhe m\u00eb pas shtojm\u00eb kodin e ri duke e vendosur ato brenda LinearLayout (#3):<\/p>\n<pre><code class=\"kotlin\"><\/code><\/pre>\n<p>\nP\u00ebr shkak se q\u00ebllimi kryesor i aplikacionit \u00ebsht\u00eb llogaritja e shpenzimeve t\u00eb individualizuar p\u00ebr secilin pjes\u00ebmarr\u00ebs n\u00eb dark\u00eb, kostot p\u00ebr person jan\u00eb shum\u00eb t\u00eb r\u00ebnd\u00ebsishme. <\/p>\n<p>EditText e kufizon hyrjen n\u00eb nj\u00eb rresht; ky paramet\u00ebr duhet t\u00eb ket\u00eb vler\u00ebn NumberDecimal inputType.<\/p>\n<p><img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/7dc4e90d8188a08933e7a92b119472ee.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i> Nisemi me projektin p\u00ebr testim dhe futim parametrat e d\u00ebmtimit t\u00eb p\u00ebrgjithsh\u00ebm (filxhan\u00eb, pjata t\u00eb thyera, etj.)<\/i><\/p>\n<h3>Zhvillimi i seksionit \"Njer\u00ebzit dhe tips\"<\/h3>\n<p>\nP\u00ebr t\u00eb shtuar zgjedhjen e shum\u00ebs s\u00eb tipsit, futim kodin m\u00eb posht\u00eb n\u00eb nj\u00eb seksion t\u00eb ri LinearLayout (#4):<\/p>\n<pre><code class=\"kotlin\"><\/code><\/pre>\n<p>\nKy fragment kodi \u00ebsht\u00eb i nevojsh\u00ebm p\u00ebr llogaritjen e sakt\u00eb t\u00eb shum\u00ebs s\u00eb tipsit. Vlera e parazgjedhur e tekstit \u00ebsht\u00eb 20. ImageButtons jan\u00eb t\u00eb pajisura me ikona n\u00eb dosjen me t\u00eb drejta shkrimi.<\/p>\n<p>Kopjojm\u00eb plot\u00ebsisht seksionin dhe shtojm\u00eb t\u00eb ardhsh\u00ebm (#5):<\/p>\n<ul>\n<li> Id-t\u00eb e ImageButton (subtractPeopleButton, addPeopleButton)<\/li>\n<li> Id-t\u00eb e TextView (numberOfPeopleStaticText, numberOfPeopleTextView)<\/li>\n<li> DefaultText p\u00ebr numberOfPeopleTextView (duhet t\u00eb jet\u00eb 4).<\/li>\n<\/ul>\n<p>\n<img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/df99acfb33c3d27126db807b805c9c87.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nTani, kur nisim aplikacionin, ekziston mund\u00ebsia p\u00ebr t\u00eb shtuar shum\u00ebn e fatur\u00ebs, gjithashtu funksionojn\u00eb butonat \"Shto\/Subtraho\", por akoma nuk ndodh asgj\u00eb.<\/p>\n<h3>Shtojm\u00eb Views<\/h3>\n<p>\nHapim MainActivity.kt dhe shtojm\u00eb k\u00ebt\u00eb n\u00eb funksionin initViews (#6):<\/p>\n<pre><code class=\"kotlin\">fun private initViews() {\n        expensePerPersonTextView = findViewById(R.id.expensePerPersonTextView)\n        billEditText = findViewById(R.id.billEditText)\n \naddTipButton = findViewById(R.id.addTipButton)\n        tipTextView = findViewById(R.id.tipTextView)\n        subtractTipButton = findViewById(R.id.subtractTipButton)\n \naddPeopleButton = findViewById(R.id.addPeopleButton)\n        numberOfPeopleTextView = findViewById(R.id.numberOfPeopleTextView)\n        subtractPeopleButton = findViewById(R.id.subtractPeopleButton)\n \n\/\/TODO #8: Lidhen butonat me d\u00ebgjuesit\n \n\/\/TODO #16: Lidhen EditText me TextWatcher\n \n}<\/code><\/pre>\n<p><\/p>\n<h3>Po p\u00ebrfundojm\u00eb butonat<\/h3>\n<p>\nP\u00ebr t\u00eb shtuar mb\u00ebshtetje p\u00ebr klikimet e butonave, implementojm\u00eb View.OnClickListener n\u00eb nivelin e klas\u00ebs (#7):<\/p>\n<p>class MainActivity: AppCompatActivity(), View.OnClickListener {<\/p>\n<p>Tani nuk do t\u00eb mund t\u00eb kompiloni projektin, duhen b\u00ebr\u00eb disa veprime t\u00eb tjera (#8):<\/p>\n<pre><code class=\"kotlin\">override fun onClick(v: View?) {\n        when (v?.id) {\n            R.id.addTipButton -&gt; incrementTip()\n            R.id.subtractTipButton -&gt; decrementTip()\n            R.id.addPeopleButton -&gt; incrementPeople()\n            R.id.subtractPeopleButton -&gt; decrementPeople()\n        }\n    }<\/code><\/pre>\n<p>\nSa i p\u00ebrket butonave dhe \u00e7els\u00ebve, n\u00eb Kotlin gjith\u00e7ka \u00ebsht\u00eb organizuar shum\u00eb mir\u00eb! Shtojm\u00eb kodin e vendosur m\u00eb posht\u00eb n\u00eb t\u00eb gjitha funksionet increment dhe decrement<br \/>\n (#9\u200a\u2013#12):<\/p>\n<pre><code class=\"kotlin\">private fun incrementTip() {\n        if (tipPercent != MAX_TIP) {\n            tipPercent += TIP_INCREMENT_PERCENT\n            tipTextView.text = String.format(\"%d%%\", tipPercent)\n        }\n    }\n \nprivate fun decrementTip() {\n        if (tipPercent != MIN_TIP) {\n            tipPercent -= TIP_INCREMENT_PERCENT\n            tipTextView.text = String.format(\"%d%%\", tipPercent)\n        }\n    }\n \nprivate fun incrementPeople() {\n        if (numberOfPeople != MAX_PEOPLE) {\n            numberOfPeople += PEOPLE_INCREMENT_VALUE\n            numberOfPeopleTextView.text = numberOfPeople.toString()\n        }\n    }\n \nprivate fun decrementPeople() {\n        if (numberOfPeople != MIN_PEOPLE) {\n            numberOfPeople -= PEOPLE_INCREMENT_VALUE\n            numberOfPeopleTextView.text = numberOfPeople.toString()\n        }\n    }<\/code><\/pre>\n<p>\nKy kod mbron funksionet e rritjes me vlera maksimale (MAX_TIP &amp; MAX_PEOPLE). Gjithashtu, kodi mbron funksionet e zvog\u00eblimit me vlera minimale (MIN_TIP &amp; MIN_PEOPLE).<\/p>\n<p>Tani lidhim butonat me d\u00ebgjuesit n\u00eb funksionin initViews (#13):<\/p>\n<pre><code class=\"kotlin\">private fun initViews() {\n \n...\n \naddTipButton.setOnClickListener(this)\n        subtractTipButton.setOnClickListener(this)\n \naddPeopleButton.setOnClickListener(this)\n        subtractPeopleButton.setOnClickListener(this)\n \n\/\/TODO #15: Lidhen EditText me TextWatcher\n}<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/73e7477d4b02548aad7c2112c6be5d80.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nTani mund t\u00eb shtoni d\u00ebmin total, k\u00ebshillat dhe numrin e pjes\u00ebmarr\u00ebsve n\u00eb takim. Dhe tani gj\u00ebja m\u00eb e r\u00ebnd\u00ebsishme...<\/p>\n<h3>Sekcioni i llogaritjes s\u00eb shpenzimeve<\/h3>\n<p>Ky kod llogarit shpenzimet (#14):<\/p>\n<pre><code class=\"kotlin\">private fun calculateExpense() {\n \nval totalBill = billEditText.text.toString().toDouble()\n \nval totalExpense = ((HUNDRED_PERCENT + tipPercent) \/ HUNDRED_PERCENT) * totalBill\n        val individualExpense = totalExpense \/ numberOfPeople\n \nexpensePerPersonTextView.text = String.format(\"$%.2f\", individualExpense)\n \n}<\/code><\/pre>\n<p>\nK\u00ebtu thirret funksioni q\u00eb mund\u00ebson marrjen parasysh t\u00eb numrit t\u00eb njer\u00ebzve n\u00eb kompani dhe llogaritjen e k\u00ebshillave (#15):<\/p>\n<pre><code class=\"kotlin\">private fun incrementTip() {\n \n\u2026\n \n}\n \nprivate fun decrementTip() {\n \n\u2026\n \n}\n \nprivate fun incrementPeople() {\n \n\u2026\n \n}\n \nprivate fun decrementPeople() {\n \n\u2026\n \n}<\/code><\/pre>\n<p>\nPo fillon aplikacionin. Duket dhe punon shk\u00eblqyesh\u00ebm. Por mund t\u00eb jet\u00eb edhe m\u00eb mir\u00eb.<\/p>\n<p>N\u00ebse provoni t\u00eb fshini shum\u00ebn e fatur\u00ebs dhe pastaj t\u00eb rritni numrin e k\u00ebshillave ose miqve, aplikacioni do t\u00eb bjer\u00eb, pasi ende nuk ka nj\u00eb kontroll p\u00ebr vlerat e zeruara t\u00eb kostove. M\u00eb shum\u00eb, n\u00ebse provoni t\u00eb ndryshoni shum\u00ebn e fatur\u00ebs, shpenzimet nuk do t\u00eb p\u00ebrdit\u00ebsohen.<\/p>\n<h3>Hapat p\u00ebrfundimtar\u00eb<\/h3>\n<p>\nShtojm\u00eb TextWatcher (#16):<\/p>\n<p>class MainActivity: AppCompatActivity(), View.OnClickListener, TextWatcher {<\/p>\n<p>N\u00eb vazhdim, p\u00ebrfshijm\u00eb d\u00ebgjuesin billEditText (#17):<\/p>\n<p>billEditText.addTextChangedListener(this)<\/p>\n<p>Plus, shtojm\u00eb kodin p\u00ebr t\u00eb realizuar TextWatcher (#18):<\/p>\n<pre><code class=\"kotlin\">override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {\n        if (!billEditText.text.isEmpty()) {\n            calculateExpense()\n        }\n    }\noverride fun afterTextChanged(s: Editable?) {}\n\n    override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/623256a43c969d8b3a434d10a357c1a0.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n <br \/>\nTani, gjith\u00e7ka funksionon absolutisht! Urime, keni shkruar kalkulatorin tuaj t\u00eb k\u00ebshillave n\u00eb Kotlin.<\/p>\n<p><img decoding=\"async\" alt=\"Krijimi i nj\u00eb kalkulatori t\u00eb dhuratave n\u00eb Kotlin: si funksionon?\" src=\"\/wp-content\/uploads\/2019\/04\/5650bfecfadf3fd56785b7d6ac72ed87.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<blockquote><p><b>Skillbox rekomandon:<\/b><\/p>\n<ul>\n<li>Kursi praktik dyvje\u00e7ar <noindex><a rel=\"nofollow\" href=\"https:\/\/iamwebdev.skillbox.ru\/?utm_source=skillbox.media&amp;utm_medium=habr.com&amp;utm_campaign=WEBDEVPRO&amp;utm_content=articles&amp;utm_term=kotlintips\">\u00abUn\u00eb jam zhvillues i uebit PRO\u00bb<\/a><\/noindex>.<\/li>\n<li>Kurs online <noindex><a rel=\"nofollow\" href=\"https:\/\/skillbox.ru\/c-sharp\/?utm_source=skillbox.media&amp;utm_medium=habr.com&amp;utm_campaign=CSHDEV&amp;utm_content=articles&amp;utm_term=kotlintips\">\u00abZhvillues C#\u00bb<\/a><\/noindex>.<\/li>\n<li>Kurs praktik nj\u00ebvje\u00e7ar <noindex><a rel=\"nofollow\" href=\"https:\/\/skillbox.ru\/php\/?utm_source=skillbox.media&amp;utm_medium=habr.com&amp;utm_campaign=PHPDEV&amp;utm_content=articles&amp;utm_term=kotlintips\">\u00abZhvillues PHP nga 0 n\u00eb PRO\u00bb<\/a><\/noindex>.\n<\/li>\n<\/ul>\n<\/blockquote>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/skillbox\/blog\/448582\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0447\u0430\u0435\u0432\u044b\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Kotlin. \u0415\u0441\u043b\u0438 \u0442\u043e\u0447\u043d\u0435\u0435, \u0442\u043e Kotlin 1.3.21, Android 4, Android Studio 3. \u0421\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u043e\u0439 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0447\u0430\u0435\u0432\u044b\u0445 \u0441 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":23712,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-31843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/news\/sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0447\u0430\u0435\u0432\u044b\u0445 \u043d\u0430 Kotlin: \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/news\/sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:43:27+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:43:27+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Krijimi i kalkulatorit t\u00eb k\u00ebshillave n\u00eb Kotlin: si funksionon? | ProHoster","description":"Tregojm\u00eb si t\u00eb krijoni nj\u00eb t\u00eb thjesht\u00eb.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/news\/sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0447\u0430\u0435\u0432\u044b\u0445 \u043d\u0430 Kotlin: \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? | ProHoster","og:description":"\u0420\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435.","og:url":"https:\/\/prohoster.info\/sq\/blog\/news\/sozdanie-kalkulyatora-chaevyh-na-kotlin-kak-eto-rabotaet","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:43:27+00:00","article:modified_time":"2019-10-31T18:43:27+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"31843","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 08:07:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 03:10:45","updated":"2026-01-21 08:07:20","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/31843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=31843"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/31843\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/23712"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=31843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=31843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=31843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}