

{"id":115302,"date":"2023-09-27T19:00:18","date_gmt":"2023-09-27T13:30:18","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=115302"},"modified":"2026-06-01T14:11:32","modified_gmt":"2026-06-01T08:41:32","slug":"android-kotlin-project-calorie-calculator-app","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/","title":{"rendered":"Android Kotlin Project \u2013 Calorie Calculator App"},"content":{"rendered":"<p>Hello there, Android enthusiasts! Today we will look at and learn how to develop an Android project, a calorie counter in Android Studio. In this article, we&#8217;ll learn about the entire project&#8217;s development.<\/p>\n<p>A calorie calculator app in Kotlin is an application that determines a daily calorie intake based on some parameters. The app provides a simple and easy-to-use interface where users can input their personal information, such as age, gender, height, weight, and activity level, and receive an estimate of the number of calories they need to consume each day to maintain, gain, or lose weight.<\/p>\n<h3>About Android Kotlin Calorie Calculator App<\/h3>\n<p>This is a simple Calorie Calculator App Project for those just learning the fundamentals of developing Android applications. This Android app&#8217;s user interface contains multiple activities; the home screen contains two buttons for the user to choose their gender, which redirects to respective calorie calculators that give the daily calorie intake goal based on some parameters. Details about the application\u2019s user interface are as follows:<\/p>\n<p>1. The home screen contains two buttons, \u2018Male\u2019 and \u2018Female\u2019, for the user to choose from; depending on which button the user clicks, they are redirected to the respective calorie calculators.<br \/>\n2. The user must fill out various fields, including height, weight, age, and activity level, in both the male and female calorie calculator activities before the user&#8217;s calorie intake can be calculated.<br \/>\n3. At the bottom of both activities, there is a button, \u2018Calculate Calories\u2019.<br \/>\n4. When the \u2018Calculate Calories\u2019 button is clicked, the ideal daily calorie intake to maintain the same weight is displayed using a textview.<\/p>\n<h3>Prerequisites for Calorie Calculator App using Android Kotlin<\/h3>\n<p>To develop this Android Kotlin Calorie Calculator App, the requirements and prerequisites are as follows:<\/p>\n<p><strong>1. Kotlin:<\/strong> You must become acquainted with Kotlin programming first. It is necessary because we&#8217;ll be writing the app&#8217;s code in the programming language Kotlin.<br \/>\n<strong>2. XML:<\/strong> XML is a further essential part of our Android application. It will be used to create the user interface for the application.<br \/>\n<strong>3. Android Studio:<\/strong> Android Studio is at the core of our application because it is how we will create it. An Android virtual device that can be used to test an application&#8217;s functionality is also available with Android Studio.<\/p>\n<h3>Download Android Kotlin Calorie Calculator App Project<\/h3>\n<p>Please download the source code of Android Kotlin Calorie Calculator App Project: <a href=\"https:\/\/drive.google.com\/file\/d\/19pQnbzPGyFlIff7UeAGv1wwkRUGVWUWQ\/view?usp=drive_link\"><strong>Android Kotlin Calorie Calculator Project Code.<\/strong><\/a><\/p>\n<h3>Develop a Calorie Calculator Application in Android Studio<\/h3>\n<p>We&#8217;ll now start working on developing a Calorie Calculator application. Before actually implementing and executing the code, we will learn about its working. So, let&#8217;s look at the files and functions needed to run the code:<\/p>\n<p>In order to make this Android Calorie Counter application, you must follow a set of instructions. We are here to guide you through each step of creating an app.<\/p>\n<p>1. To the location of your choice, extract all the files from the downloaded zip file.<br \/>\n2. Launch Android Studio.<br \/>\n3. Open by selecting File.<br \/>\n4. Locate and choose the extracted folder, then select OK.<\/p>\n<p>The Calorie calculator application\u2019s source code has been successfully opened in Android Studio.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-android-studio.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120100 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-android-studio.webp\" alt=\"calorie calculator android studio\" width=\"1920\" height=\"996\" \/><\/a><\/p>\n<p>1. The \u201cactivity_main\u201d is an XML file that is responsible for creating the user interface of the home screen that is displayed when the Calorie Counter app is initialized.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    tools:context=\".MainActivity\"&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/tv1\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Choose Your Gender\"\r\n        android:textSize=\"25sp\"\r\n        app:layout_constraintBottom_toBottomOf=\"parent\"\r\n        app:layout_constraintEnd_toEndOf=\"parent\"\r\n        app:layout_constraintStart_toStartOf=\"parent\"\r\n        app:layout_constraintTop_toTopOf=\"parent\" \/&gt;\r\n\r\n    &lt;LinearLayout\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        app:layout_constraintTop_toBottomOf=\"@+id\/tv1\"\r\n        app:layout_constraintStart_toStartOf=\"parent\"\r\n        app:layout_constraintEnd_toEndOf=\"parent\"&gt;\r\n        &lt;Button\r\n            android:id=\"@+id\/male_bt\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:layout_margin=\"10dp\"\r\n            android:text=\"Male\"\/&gt;\r\n\r\n        &lt;Button\r\n            android:id=\"@+id\/female_bt\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:layout_margin=\"10dp\"\r\n            android:text=\"Female\"\/&gt;\r\n    &lt;\/LinearLayout&gt;\r\n\r\n&lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;\r\n<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-activity-main.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120101 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-activity-main.webp\" alt=\"calorie calculator activity main\" width=\"1919\" height=\"976\" \/><\/a><\/p>\n<p>2. \u2018Acitivity_male_bmi.xml\u2019 is responsible for creating the user interface when the user clicks on \u2018Male\u2019 button on the home screen.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    tools:context=\".MaleBMI\"&gt;\r\n\r\n    &lt;TextView\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_gravity=\"center\"\r\n        android:layout_marginTop=\"20dp\"\r\n        android:textSize=\"20sp\"\r\n        android:textStyle=\"bold\"\r\n        android:text=\"Daily Calorie Calculator for Men\"\r\n        \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/heightET\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_margin=\"10dp\"\r\n        android:hint=\"Height (in cms)\" \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/weightET\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_margin=\"10dp\"\r\n        android:hint=\"Weight (in kgs)\" \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/ageET\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_margin=\"10dp\"\r\n        android:hint=\"Age\" \/&gt;\r\n\r\n    &lt;RadioGroup\r\n        android:id=\"@+id\/radioGroupGender\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:orientation=\"vertical\"&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r1\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Little To No Exercise\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r2\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Lightly active (exercise 1-3 days per week)\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r3\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Moderately active (exercise 3-5 days per week)\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r4\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Very active (exercise 6-7 days per week)\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r5\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Extra active (very hard exercise or physical job)V\" \/&gt;\r\n\r\n    &lt;\/RadioGroup&gt;\r\n\r\n    &lt;Button\r\n        android:id=\"@+id\/calculate\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:textAlignment=\"center\"\r\n        android:text=\"Calculate Calories\"\r\n        android:layout_gravity=\"center_horizontal\"\/&gt;\r\n    &lt;TextView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:textAlignment=\"center\"\r\n        android:textSize=\"15sp\"\r\n        android:text=\"Your daily calorie intake should be :\"\/&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/calories\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:textAlignment=\"center\"\r\n        android:textSize=\"20sp\"\r\n        android:text=\"\"\/&gt;\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/activity-male-bmixml.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120102 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/activity-male-bmixml.webp\" alt=\"activity male bmi(xml)\" width=\"1920\" height=\"996\" \/><\/a><\/p>\n<p>3. \u2018Acitivity_female_bmi.xml\u2019 is responsible for creating the user interface when the user clicks on \u2018Female\u2019 button on the home screen.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    tools:context=\".MaleBMI\"&gt;\r\n\r\n    &lt;TextView\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_gravity=\"center\"\r\n        android:layout_marginTop=\"20dp\"\r\n        android:textSize=\"20sp\"\r\n        android:textStyle=\"bold\"\r\n        android:text=\"Daily Calorie Calculator for Women\"\r\n        \/&gt;\r\n\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/heightET\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_margin=\"10dp\"\r\n        android:hint=\"Height (in cms)\" \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/weightET\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_margin=\"10dp\"\r\n        android:hint=\"Weight (in kgs)\" \/&gt;\r\n\r\n    &lt;EditText\r\n        android:id=\"@+id\/ageET\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_margin=\"10dp\"\r\n        android:hint=\"Age\" \/&gt;\r\n\r\n    &lt;RadioGroup\r\n        android:id=\"@+id\/radioGroupGender\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:orientation=\"vertical\"&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r1\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Little To No Exercise\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r2\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Lightly active (exercise 1-3 days per week)\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r3\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Moderately active (exercise 3-5 days per week)\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r4\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Very active (exercise 6-7 days per week)\" \/&gt;\r\n\r\n        &lt;RadioButton\r\n            android:id=\"@+id\/r5\"\r\n            android:layout_width=\"wrap_content\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Extra active (very hard exercise or physical job)V\" \/&gt;\r\n\r\n    &lt;\/RadioGroup&gt;\r\n\r\n    &lt;Button\r\n        android:id=\"@+id\/calculate\"\r\n        android:layout_width=\"wrap_content\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:textAlignment=\"center\"\r\n        android:text=\"Calculate Calories\"\r\n        android:layout_gravity=\"center_horizontal\"\/&gt;\r\n    &lt;TextView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:textAlignment=\"center\"\r\n        android:textSize=\"15sp\"\r\n        android:text=\"Your daily calorie intake should be :\"\/&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/calories\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:textAlignment=\"center\"\r\n        android:textSize=\"20sp\"\r\n        android:text=\"\"\/&gt;\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/activity-female-bmixml.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120103 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/activity-female-bmixml.webp\" alt=\"activity female bmi(xml)\" width=\"1920\" height=\"968\" \/><\/a><\/p>\n<p>4. \u2018MainActivity\u2019 is a kotlin file, which is responsible for the functionality of the application where the user chooses their gender.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MainActivity : AppCompatActivity() {\r\n\r\n    private lateinit var male:Button\r\n    private lateinit var female:Button\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n\r\n        male = findViewById(R.id.male_bt)\r\n        female = findViewById(R.id.female_bt)\r\n\r\n        male.setOnClickListener {\r\n            val intent = Intent(this, MaleBMI::class.java)\r\n            startActivity(intent)\r\n        }\r\n\r\n        female.setOnClickListener {\r\n            val intent = Intent(this, FemaleBMI::class.java)\r\n            startActivity(intent)\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>5. MaleBMI.kt is a kotlin file that determines the daily calorie intake target for men and is essential to the operation of the calorie calculator. This file accepts input from the user and computes the daily calories needed for the user to maintain weight using a few formulas and input variables.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class MaleBMI : AppCompatActivity() {\r\n    private lateinit var heightEt:EditText\r\n    private lateinit var weightEt:EditText\r\n    private lateinit var ageEt:EditText\r\n    private lateinit var calculate: Button\r\n    private lateinit var calories:TextView\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_male_bmi)\r\n\r\n\r\n        val r1 = findViewById&lt;RadioButton&gt;(R.id.r1)\r\n        val r2 = findViewById&lt;RadioButton&gt;(R.id.r2)\r\n        val r3 = findViewById&lt;RadioButton&gt;(R.id.r3)\r\n        val r4 = findViewById&lt;RadioButton&gt;(R.id.r4)\r\n        val r5 = findViewById&lt;RadioButton&gt;(R.id.r5)\r\n\r\n        var value:Float = 0f\r\n\r\n        r1.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.20f\r\n        }\r\n\r\n        r2.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.375f\r\n        }\r\n\r\n        r3.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.55f\r\n        }\r\n\r\n        r4.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.725f\r\n        }\r\n\r\n        r5.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.90f\r\n        }\r\n\r\n        heightEt = findViewById(R.id.heightET)\r\n        weightEt = findViewById(R.id.weightET)\r\n        ageEt = findViewById(R.id.ageET)\r\n\r\n        calculate = findViewById(R.id.calculate)\r\n\r\n        calculate.setOnClickListener {\r\n            var height = heightEt.text.toString().toFloat()\r\n            var weight = weightEt.text.toString().toFloat()\r\n            var age = ageEt.text.toString().toFloat()\r\n            val bmr = (weight*10)+(6.25*height)+5-(5*age)\r\n            val goal = bmr*value\r\n\r\n            calories = findViewById(R.id.calories)\r\n\r\n            calories.setText(goal.toString())\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>6. FemaleBMI.kt is a kotlin file that determines the daily calorie intake target for females and is essential to the operation of the calorie calculator. This file accepts input from the user and computes the daily calories needed for the user to maintain weight using a few formulas and input variables.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class FemaleBMI : AppCompatActivity() {\r\n    private lateinit var heightEt: EditText\r\n    private lateinit var weightEt: EditText\r\n    private lateinit var ageEt: EditText\r\n    private lateinit var calculate: Button\r\n    private lateinit var calories: TextView\r\n    override fun onCreate(savedInstanceState: Bundle?) {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_female_bmi)\r\n\r\n        val r1 = findViewById&lt;RadioButton&gt;(R.id.r1)\r\n        val r2 = findViewById&lt;RadioButton&gt;(R.id.r2)\r\n        val r3 = findViewById&lt;RadioButton&gt;(R.id.r3)\r\n        val r4 = findViewById&lt;RadioButton&gt;(R.id.r4)\r\n        val r5 = findViewById&lt;RadioButton&gt;(R.id.r5)\r\n\r\n        var value:Float = 0f\r\n\r\n        r1.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.20f\r\n        }\r\n\r\n        r2.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.375f\r\n        }\r\n\r\n        r3.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.55f\r\n        }\r\n\r\n        r4.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.725f\r\n        }\r\n\r\n        r5.setOnCheckedChangeListener { compoundButton, b -&gt;\r\n            value = 1.90f\r\n        }\r\n\r\n        heightEt = findViewById(R.id.heightET)\r\n        weightEt = findViewById(R.id.weightET)\r\n        ageEt = findViewById(R.id.ageET)\r\n\r\n        calculate = findViewById(R.id.calculate)\r\n\r\n        calculate.setOnClickListener {\r\n            var height = heightEt.text.toString().toFloat()\r\n            var weight = weightEt.text.toString().toFloat()\r\n            var age = ageEt.text.toString().toFloat()\r\n            val bmr = (weight*10)+(6.25*height)-(5*age)-161\r\n            val goal = bmr*value\r\n\r\n            calories = findViewById(R.id.calories)\r\n\r\n            calories.setText(goal.toString())\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h3>Android Kotlin Calorie Calculator App Output:<\/h3>\n<h4>1. Home Screen:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-home-screen.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120104 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-home-screen.webp\" alt=\"calorie calculator home screen\" width=\"400\" height=\"715\" \/><\/a><\/p>\n<h4>2. Gender selected \u2013 MALE :<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-male-bmi.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120105 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-male-bmi.webp\" alt=\"calorie calculator male bmi\" width=\"400\" height=\"629\" \/><\/a><\/p>\n<h4>3. Gender selected \u2013 FEMALE:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-female-bmi.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120106 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculator-female-bmi.webp\" alt=\"calorie calculator female bmi\" width=\"400\" height=\"651\" \/><\/a><\/p>\n<h4>4. Calorie Calculated for a male:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculate-for-male.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120107 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculate-for-male.webp\" alt=\"calorie calculate for male\" width=\"400\" height=\"698\" \/><\/a><\/p>\n<h4>5. Calorie Calculated for a female:<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculate-for-female.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120108 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/calorie-calculate-for-female.webp\" alt=\"calorie calculate for female\" width=\"400\" height=\"646\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>So, in this Android Kotlin Calorie Calculator App, we learnt how to use Android Studio to develop an application that calculates daily calorie intake goals based on some parameters and using formulas. This android project is suitable for beginners as it will improve your ability to design user interface as per the application\u2019s need and work with multiple activities, also taking input from the user. We hope you enjoyed it, and we are confident that you will like putting it into practice.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2596,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/19pQnbzPGyFlIff7UeAGv1wwkRUGVWUWQ\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601085654\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/19pQnbzPGyFlIff7UeAGv1wwkRUGVWUWQ\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-02 07:23:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-21 09:52:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-03 14:16:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-15 06:43:48&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-07-22 05:25:19&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-07-22 05:25:19&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello there, Android enthusiasts! Today we will look at and learn how to develop an Android project, a calorie counter in Android Studio. In this article, we&#8217;ll learn about the entire project&#8217;s development. A&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":120099,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27612],"tags":[28226,28225,28093,27685,28220,28228,28227],"class_list":["post-115302","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android-kotlin-tutorials","tag-android-kotlin-calorie-calculator-app","tag-android-kotlin-calorie-calculator-app-project","tag-android-kotlin-project","tag-android-kotlin-project-ideas","tag-android-kotlin-projects-for-practice","tag-calorie-calculator-app","tag-calorie-calculator-app-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android Kotlin Project \u2013 Calorie Calculator App - DataFlair<\/title>\n<meta name=\"description\" content=\"An Android Calorie Calculator Project is an application that determines a daily calorie intake based on some parameters.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Kotlin Project \u2013 Calorie Calculator App - DataFlair\" \/>\n<meta property=\"og:description\" content=\"An Android Calorie Calculator Project is an application that determines a daily calorie intake based on some parameters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-27T13:30:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T08:41:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/android-kotlin-calorie-calculator-app.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Kotlin Project \u2013 Calorie Calculator App - DataFlair","description":"An Android Calorie Calculator Project is an application that determines a daily calorie intake based on some parameters.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/","og_locale":"en_US","og_type":"article","og_title":"Android Kotlin Project \u2013 Calorie Calculator App - DataFlair","og_description":"An Android Calorie Calculator Project is an application that determines a daily calorie intake based on some parameters.","og_url":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-09-27T13:30:18+00:00","article_modified_time":"2026-06-01T08:41:32+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/android-kotlin-calorie-calculator-app.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Android Kotlin Project \u2013 Calorie Calculator App","datePublished":"2023-09-27T13:30:18+00:00","dateModified":"2026-06-01T08:41:32+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/"},"wordCount":833,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/android-kotlin-calorie-calculator-app.webp","keywords":["android kotlin calorie calculator app","android kotlin calorie calculator app project","android kotlin project","android kotlin project ideas","android kotlin projects for practice","calorie calculator app","calorie calculator app project"],"articleSection":["Android Kotlin Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/","url":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/","name":"Android Kotlin Project \u2013 Calorie Calculator App - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/android-kotlin-calorie-calculator-app.webp","datePublished":"2023-09-27T13:30:18+00:00","dateModified":"2026-06-01T08:41:32+00:00","description":"An Android Calorie Calculator Project is an application that determines a daily calorie intake based on some parameters.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/android-kotlin-calorie-calculator-app.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/android-kotlin-calorie-calculator-app.webp","width":1200,"height":628,"caption":"android kotlin calorie calculator app"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/android-kotlin-project-calorie-calculator-app\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Android Kotlin Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/android-kotlin-tutorials\/"},{"@type":"ListItem","position":3,"name":"Android Kotlin Project \u2013 Calorie Calculator App"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam6\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/115302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=115302"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/115302\/revisions"}],"predecessor-version":[{"id":148680,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/115302\/revisions\/148680"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120099"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=115302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=115302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=115302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}