Mini Project File of Unit Converter App

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

DECLARATION

I hereby declare that submission is my own work and that to


the best of my knowledge and belief, it contains no material
previously published or written by another neither person nor
material which to a substantial extent has been accepted for
the award of any degree of the university or other institute of
higher learning, except where due acknowledgement has been
made in the text.

Signature:

Aadil Khan
(22LATCSECS076LAT)

Date:
SR. GROUP OF INSTITUTION, JHANSI 284003
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that Mini Project entitled “Unit Converter App” is being
submitted by Aadil Khan at S.R. Group of Institution, Jhansi affiliated to Dr.
A. P. J. Abdul Kalam Technical University, Lucknow and is cord of his own
work carried out under my supervision and this has not been submitted
elsewhere for Mini Project Assessment.

Mini Project Guide - Head of Department-

Mr. Aman Saluja Er. Chandra Prakash Singh


Assistant Professor
Computer Science & Engineering Department
ACKNOWLEDGEMENT

I would like to express my sincere gratitude and heartfelt thanks to Mr. Aman
Saluja, our esteemed project guide, for his invaluable guidance, support, and
encouragement throughout the duration of making this mini project. His
expertise, insightful feedback, and constant motivation played a pivotal role in
shaping the project and enhancing its quality.
I am also immensely thankful to Er. Chandra Prakash Singh(HOD-CSE), our
Head of the Department, for providing the necessary resources and creating an
environment conducive to learning and innovation. His vision and commitment
to academic excellence have been a constant source of inspiration.
I extend my appreciation to all the faculty members of the Department of
Computer Science & Engineering for their academic input and constructive
criticism, which greatly contributed to the refinement of my project.
I am grateful to my fellow classmates who helped with me on this project,
sharing their ideas and insights, making this journey a collaborative and
enriching experience.
Last but not least, I would like to express my heartfelt thanks to my family and
friends for their unwavering support and encouragement throughout this
endeavour.
This project would not have been possible without the collective efforts and
support from all these individuals, and for that, I am truly thankful.

Aadil Khan
(22LATCSECS076LAT)
Department of Computer Science & Engineering
17-01-2024
ABSTRACT

 The Length Unit Converter App is a mini-project designed to simplify


and expedite unit conversions for various length measurements.

 This application provides an intuitive and user-friendly interface,


allowing users to effortlessly convert between different length units such
as meters, feet, inches and centimetres.

 The app caters to diverse user needs by offering a comprehensive range


of length units commonly used in daily life and various fields.

 Key features of the Length Unit Converter App include real-time


conversion results, ensuring accuracy and reliability.

 The app is developed using modern programming language such as


Kotlin and Jetpack Compose, making it compatible with android
platforms for enhanced accessibility. Its simplicity and efficiency make it
a valuable tool for students, professionals, and anyone in need of quick
and precise length unit conversions.

 The Length Unit Converter App aims to streamline the conversion


process, providing a practical solution for a common task in an easy-to-
use format
TABLE OF CONTENT
Tittle
 Declaration
 Certificate
 Acknowledgement
 Abstract
 Introduction

 Aims & Objectives of Project


 Requirement for running the project

 Software Requirement

 Android Studio
 Kotlin & Jetpack Compose

 System Implementation

 Outlined Text Field


 Buttons
 Text
 Dropdown List

 App Testing

 Performing a simple conversion

 Conclusion and Future Scope


 References
INTRODUCTION
This chapter gives an overview about the aim and objectives of the project and
requirement of the device for smooth functioning of the application.

PROJECT AIMS & OBJECTIVES

 Efficient Length Conversions : Develop a user-friendly application that


efficiently converts length units, including meters, inches, millimetres,
and centimetres, providing users with a quick and accurate tool for
common length conversions.

 Intuitive User Interface: Design a clean and intuitive user interface


using Jetpack Compose to enhance the user experience, making the app
accessible and easy to navigate for users of varying technical expertise.

 Real-time Updates: Implement real-time updates for conversion results


to ensure accuracy and responsiveness, allowing users to see instant
changes as they input values or switch between different length units.

 Versatility: Cater to a broad audience by including a comprehensive


range of length units commonly used in various fields, making the app
versatile for academic, professional, and personal applications.

REQUIREMENT FOR RUNNING THE PROJECT

 Operating System: Android: The app is designed for Android devices,


so a device running Android OS is required.

 Android Studio: Android Studio should be installed to open, modify, and


build the Kotlin-based project.
 Hardware Requirements: An Android device with adequate resources
(RAM, storage) to run the application smoothly.

 Internet Connection (Optional): While the app primarily functions


offline, an internet connection might be required for updates or additional
features that involve online data.

 Minimum Android Version: The app might have a minimum Android


version requirement. Ensure that the Android version on the device meets
this requirement.

 Kotlin Version: The Kotlin programming language version specified in


the project should be compatible with the installed Kotlin version on
Android Studio.

 Jetpack Compose Libraries: Required Jetpack Compose libraries and


dependencies should be included in the project. Ensure that Android
Studio can download these dependencies during the build process.
SOFTWARE REQUIREMENT
In this we will see the brief description about the different components and
software used while making this project

ANDROID STUDIO
Android Studio is the official integrated development environment (IDE) for
Android app development. It is a powerful and feature-rich tool designed to
streamline the process of creating, testing, and debugging Android applications.
Here are some key points about Android Studio:

 User Interface: Android Studio provides a user-friendly and intuitive


interface that facilitates efficient app development. It includes various
panels for code editing, project navigation, and real-time previews of app
layouts.

 Gradle Build System: Android Studio uses the Gradle build system,
which allows developers to manage project dependencies, build
configurations, and easily customize the build process. This helps in
creating optimized and efficient Android apps.

 Code Editor: The IDE features a robust code editor with advanced code
completion, syntax highlighting, and error checking. It supports various
programming languages such as Java and Kotlin, making it flexible for
developers with different language preferences.

 Layout Editor: Android Studio includes a visual layout editor that


enables developers to design the user interface of their apps using a drag-
and-drop interface. This feature helps in creating responsive and visually
appealing app layouts.
 Emulator and Device Testing: Android Studio comes with a built-in
emulator that allows developers to test their apps on different Android
device configurations. It also supports the connection of physical devices
for testing purposes.

 Debugging Tools: The IDE provides powerful debugging tools, including


real-time code inspection, breakpoints, and a debugger, to help
developers identify and fix issues in their code effectively.

 Support for Kotlin: Android Studio fully supports the Kotlin


programming language, offering developers a modern and concise
alternative to Java for Android app development.

 Continuous Updates: Android Studio receives regular updates from


Google, ensuring that developers have access to the latest features,
improvements, and compatibility with the newest Android versions.

 KOTLIN AND JETPACK COMPOSE


Kotlin and Jetpack Compose represent a powerful combination for modern
Android app development. Here's a brief note on both:

 Kotlin: Kotlin is a statically-typed programming language developed by


JetBrains. It was officially endorsed by Google as the preferred language
for Android app development in 2017. Kotlin offers concise syntax, null
safety, and interoperability with Java, making it an excellent choice for
Android developers.

 Jetpack Compose: Jetpack Compose is a modern UI toolkit for building


native Android user interfaces. It is developed by Google and is designed
to simplify and accelerate UI development. Jetpack Compose allows
developers to define the UI using a declarative syntax in Kotlin,
eliminating the need for XML layouts and providing a more intuitive and
concise way to create user interfaces.

 Key Points on Jetpack Compose:

 Declarative UI: Jetpack Compose allows developers to describe the UI


in a declarative manner, where the UI is a function of the application
state. This approach simplifies UI development and maintenance.

 Kotlin-based DSL: Jetpack Compose uses a Kotlin-based Domain


Specific Language (DSL) to define UI components, making it easy for
developers to express UI elements in a readable and concise way.

 Reactive UI: Compose is inherently reactive, meaning that UI elements


automatically update when the underlying data changes. This reactive
paradigm simplifies state management and reduces the boilerplate code
associated with handling UI updates.

 Fully Integrated with Kotlin: Jetpack Compose is fully integrated with


Kotlin, leveraging the language's features such as extension functions and
type safety. This integration results in a more seamless and enjoyable
development experience.

 Interoperability with Existing Code: Jetpack Compose is designed to


work well with existing Android codebases, allowing developers to adopt
it incrementally in their projects.

 Consistency Across Devices: Compose is built to provide a consistent UI


development experience across different Android devices and screen
sizes, ensuring a smooth and cohesive user experience.
SYSTEM IMPLEMENTATION
In this we will see the different aspects of the app and will get a brief
description about the each element of the App

1.Tittle Text

Normal text
Text is a fundamental component in Jetpack Compose that enables the display
of textual content within the user interface. Here's a brief note on working with
Text in Jetpack Compose:
 Text Composable: Jetpack Compose provides the Text composable for
displaying text within the UI. It supports the rendering of both static and
dynamic text content.

 Styling Text: Text in Jetpack Compose can be styled using various


parameters, including font size, color, style, and alignment. This allows
developers to customize the appearance of text based on the application's
design.

 Text Resources: Text content can be provided either as direct strings or


as references to string resources, allowing for better localization and
management of text resources.

2. Outlined Text Field


Outlined Text field(for taking input)

 Creating an Outlined Text Field: To use an OutlinedTextField, you


typically provide it with some basic parameters such as value,
“onValueChange”, and label, and it automatically handles the input field
with an outlined border.

 Styling and Customization: The OutlinedTextField composable allows


for customization of appearance, including the border color, shape, and
interaction states.
the OutlinedTextField composable in Jetpack Compose simplifies the creation
of text input fields with outlined borders. It offers a range of customization
options to tailor the appearance and behaviour of text fields based on the
specific requirements of the application.

3.BUTTONS

Input Unit Button Output Unit Button

Conversion Button

In Jetpack Compose, the Button composable is a fundamental UI element that


allows developers to create interactive buttons within their Android
applications. Here's a brief note on using the Button composable in Jetpack
Compose:

 Creating a Basic Button: To create a basic button, you use the Button
composable and specify the action to be performed when the button is
clicked using the “onClick” parameter.

 Button Variants: Jetpack Compose provides different button variants,


such as outlined buttons, contained buttons, and text buttons. These
variants offer flexibility in terms of visual style.

 Styling and Customization: Buttons in Jetpack Compose can be


customized in terms of appearance, including color, shape, and size. The
colors, shape, and modifier parameters can be used for styling.
 Handling Button State: Buttons can dynamically reflect different states,
such as being enabled or disabled, based on conditions in the application.
The enabled parameter is used to control the interactivity of the button.

 Handling Clicks: The “onClick” parameter allows developers to define


the action to be executed when the button is clicked. This is where the
business logic associated with the button's functionality is typically
implemented.

4.DropDown List

Input Unit List Output Unit List

In Jetpack Compose, creating a dropdown menu involves using the


“DropdownMenu” and “DropdownMenuItem” composables. This enables
developers to implement a UI element that displays a list of options when
activated. Here's a brief note on working with dropdown menus in Jetpack
Compose:
 Creating a Basic Dropdown Menu: To implement a basic dropdown
menu, use the “DropdownMenu” and “DropdownMenuItem”
composables. The expanded parameter controls whether the menu is
currently visible.
 Styling and Customization: Customize the appearance of the
“DropdownMenu” and “DropdownMenuItem” by adjusting their
respective modifiers. This includes setting background colors, padding,
and other styling attributes.
 Handling Dropdown Menu Items: Inside the “DropdownMenu”, use
“DropdownMenuItem” composables to represent each item. The
“onClick” parameter allows you to define the action to be performed
when a menu item is clicked.
APP TESTING

Step 1- Entering the “Input value” in Outlined Text Field.

Step 2- Selecting the “Input Unit” from list.

Step 3- Selecting “Output Unit” from list.


Step 4- Pressing the “Convert” button.

Before Clicking Convert Button After Clicking Convert Button

As we can see that we have Entered the Input value as 100 in Step 1 and then
we have selected the input unit as “Centimetres” from list in Step 2 then we
have selected the Output Unit as “Millimetres” from list in Step 3 then we
converted the length in “Centimetres” to “Millimetres” in Step 4.

1 cm = 10mm
100cm = 10x100mm
100cm = 1000mm
CONCLUSION AND FUTURE SCOPE
Conclusion:
The development of the Length Unit Converter App using Kotlin and Jetpack
Compose within Android Studio has been a fulfilling and enriching journey. The
app successfully achieves its primary aim of providing users with a seamless
and intuitive tool for converting length units. The clean user interface, powered
by Jetpack Compose, enhances the overall user experience, making length
conversions quick, accurate, and accessible.

The adoption of Kotlin as the programming language brings not only


conciseness and expressiveness to the code but also aligns with modern Android
development practices. Leveraging the latest features of Android Studio, such as
Jetpack Compose and the Gradle build system, ensures the project's scalability,
maintainability, and compatibility with diverse Android devices.

The project's success is attributed to the collaborative efforts of the development


team and the guidance received from mentors. Thorough testing, user feedback,
and continuous refinement have contributed to the creation of a reliable and
user-friendly application.
Future Scope:
The Length Unit Converter App lays a strong foundation for future
enhancements and additional features. Some potential areas for future
development include:
 Extended Unit Support: Expand the app's utility by incorporating
support for additional length units based on user feedback and
requirements.

 Custom Unit Conversions: Introduce a feature that allows users to


define and save custom unit conversions, catering to specialized needs.

 Enhanced User Interactivity: Implement interactive visualizations or


animations to further engage users and improve the overall user
experience.
REFERENCES

1. WWW.GEEKSFORGEEKS.COM

2. WWW.STACKOVERFLOW.COM

3. WWW.JETPACKCOMPOSE.NET

4. WWW.UDEMY.COM

Learnt from online skill development course of Development of


Android 14 using Kotlin

You might also like