0% found this document useful (0 votes)
10 views

ITR Final

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

ITR Final

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 90

An Online Industrial Training Report

At

Jalgi Technologies Pvt Ltd.

By

Ms. Janhavi Shinde


[ Enrollment No. :2200400201]

Under the Mentorship of


Ms. K. S. Jadhav

Department of Information Technology


Sou. Venutai Chavan Polytechnic, Pune
[2024 – 2025]
Sou. Venutai Chavan Polytechnic, Pune
Department of Information Technology

CERTIFICATE

This is to certify that Ms. Janhavi Shinde with Enrolment No. (2200400201)

has successfully completed Six Weeks Industrial Training in Android

Development In the partial fulfilment towards the completion of Diploma in

Information Technology from Sou. Venutai Chavan Polytechnic, Pune

Institute Code 0040.

Date: 07 / 08 / 2024 Place: Pune

Ms. K. S. Jadhav Mr. U.S.Shirshetti Dr. (Mrs.) M.S.Jadhav


Mentor Head of Department
Principal
Title : Organizational Structure of Jalgi Technologies and General Layout
ACKNOWLDGEMENT

I am thankful to Ms. K. S. Jadhav (Lecturer, Department of Information Technology) for


guiding me in successfully completion of Industrial Training, in the partial fulfilment of
Diploma in Information Technology during the academic year 2024 – 25.

I am also thankful to my industry mentor Mr. Ganesh Khapale for granting permission for
industrial training and guiding on various portfolios of advanced technologies implemented
in current scenarios across the globe.

We are also thankful to our Mr. U. S. Shirshetti Head of Department (Information


Technology), Dr. M. S. Jadhav Principal (S.V.C.P, Pune) for their consistent and valuable
support in the completion of training. Our sincere gratitude to all those who supported
directly or indirectly for completion of training.

Janhavi Amit Shinde


Enrollment No – 2200400201
INTRODUCTION

Jalgi Technologies Pvt. Ltd. is a company established in December 2018. It has industry-
specific software expertise in sectors such as technology, healthcare, finance, media,
manufacturing, and many others. This company specializes in offering Web Designing, Web
Application Development, Mobile App Development, Software Development, Digital
Marketing, Software Testing, Quality Assurance Services, and more.

Jalgi Technologies aspires to be a global leader in IT services and solutions, revolutionizing


how service processes function. They aim to reach people across the globe, making
Information Technology accessible to everyone. By creating innovative IT solutions and
providing IT-enabled services, Jalgi Technologies strives to delight customers worldwide and
build relationships based on trust, values, and professionalism.

The company prides itself on having a dedicated team of innovative, client-sensitive, and
experienced software professionals. These professionals work to deliver customized, cost-
effective, and long-term software solutions that meet client objectives and ensure customer
satisfaction.

At Jalgi Technologies, the motto "Innovation to Societal" reflects their commitment to


providing effective and affordable services that meet customer needs and budgets. They
involve customers throughout the process, from design to deployment, to ensure that client
ideas are integrated into their work.

Even after deployment, Jalgi Technologies continues to work with customers, offering
ongoing support and digital marketing services to help promote their businesses. Their focus
is always on delivering quality products to customers, combining creative strategies with
innovative technology
About Company:

1.1 Services Provided By Jalgi Technologies

Robotic Process Automation (RPA)

Jalgi Technologies offers advanced Robotic Process Automation (RPA) services. These
services enable businesses to automate repetitive tasks, improving efficiency and accuracy.
RPA solutions provided by Jalgi Technologies help organizations streamline their operations,
reduce manual errors, and save costs by automating workflows and business processes.

Mobile App Development

Jalgi Technologies specializes in mobile app development, focusing on creating high-


performance applications for both Android and iOS platforms. The company utilizes the
latest technologies to develop custom mobile apps that are user-friendly, efficient, and
tailored to meet specific client requirements. Their expertise includes developing a wide
range of applications from simple consumer apps to complex enterprise solutions.

Software Development

Jalgi Technologies excels in software development, offering end-to-end services from


requirement analysis to deployment and maintenance. They develop standalone and web-
based software solutions using various programming languages and frameworks. The
development process involves writing interrelated programming code to deliver functional
and high-quality software that meets client needs.

Web Hosting

Jalgi Technologies provides reliable web hosting services, ensuring that websites and web
applications are accessible on the internet. They offer various hosting plans tailored to
different business requirements, including shared hosting, VPS hosting, and dedicated server
hosting. Their hosting services include high uptime, robust security, and scalable solutions to
support business growth.

Web Design and Development

Jalgi Technologies offers comprehensive web design and development services. Their team
of designers and developers create visually appealing and highly functional websites.
Services include complete site design from scratch, redesigning existing websites, error
correction, adding new sections, revamping content, and ongoing site maintenance. They
focus on creating websites that are user-friendly, responsive, and optimized for search
engines.
Digital Marketing

Jalgi Technologies provides a full suite of digital marketing services to help businesses grow
their online presence. This includes search engine optimization (SEO), social media
marketing, pay-per-click (PPC) advertising, content marketing, and email marketing. Their
digital marketing strategies are designed to increase visibility, drive traffic, and generate
leads for businesses.

Software Testing and Quality Assurance

Jalgi Technologies emphasizes the importance of quality in software development. They offer
comprehensive software testing and quality assurance services to ensure that applications are
bug-free and perform optimally. Their testing services cover various aspects such as
functional testing, performance testing, security testing, and usability testing.

SAP Services

Jalgi Technologies provides specialized SAP services, including implementation,


customization, and support. They help businesses integrate SAP solutions to streamline their
operations and improve overall efficiency. Their SAP services are tailored to meet the unique
needs of different industries, ensuring effective use of SAP's powerful capabilities.

Product Management

Jalgi Technologies offers product management services to help businesses manage their
product lifecycle effectively. This includes market research, product strategy, development
planning, and product launch. Their product management services ensure that products meet
market demands and achieve business objectives.

1.2 Products of Jalgi Technologies

1. RPA Suite

2. RPA BOT

3. SAP Solutions

4. Desktop Billing Software

5. Online Billing Software

6. Fusion Training Center Website


1.3 Organizational Structure

Founder : Mr. Bapu Arkas

Managing director : Mrs. Mohini Arkas

No. of employees : 500

Posts :  Software Developer


 Senior Developer
 Technical Leader
 Project Manager
 Quality Assurance Analyst
 Business Analysis
 Digital Marketing Specialist
 UI/UX Designer
Android Operating System
The Android operating system, developed by Google, is a leading platform for mobile devices, known
for its open-source nature and extensive developer community. Initially released in 2008, Android
has become the most widely used mobile operating system globally, powering billions of devices,
including smartphones, tablets, smartwatches, and even smart TVs.

Key Features of Android

1. Open Source: Android's open-source nature allows developers to modify and


distribute the software freely, fostering innovation and customization.
2. Google Play Store: A vast ecosystem of applications and games available for
download, providing users with a wide range of functionalities.
3. Customization: Users and manufacturers can personalize the look and feel of the
Android interface, from home screens to widgets.
4. Google Integration: Seamless integration with Google services such as Gmail,
Google Maps, and Google Drive enhances productivity and connectivity.
5. Multitasking: Android supports robust multitasking capabilities, allowing users to
switch between apps efficiently.
6. Security: Regular updates and features like Google Play Protect help ensure device
security.

Architecture of Android

Android's architecture is structured in layers, each with distinct roles and responsibilities:

1. Linux Kernel: At the core of Android is the Linux kernel, providing essential system
services such as memory management, security, process management, and
networking.
2. Hardware Abstraction Layer (HAL): This layer provides standard interfaces that
expose device hardware capabilities to the higher-level Java API framework.
3. Android Runtime (ART): ART is the managed runtime used by applications and
some system services on Android. It performs ahead-of-time (AOT) compilation,
which improves performance.
4. Native C/C++ Libraries: A set of native libraries used by various components of the
Android system, such as WebKit for the browser and SQLite for database
management.
5. Java API Framework: Provides high-level building blocks for creating Android
applications, including UI components, resource managers, and content providers.
6. System Apps: Core applications that come pre-installed on Android devices, such as
phone dialers, email clients, and web browsers.

Development Environment

Developing applications for Android primarily involves using Android Studio, the official
integrated development environment (IDE) for Android development. Key components
include:

1. Android SDK: A comprehensive set of development tools, including libraries, a


debugger, an emulator, and documentation.
2. Emulator: Allows developers to test applications on virtual devices running different
versions of Android.
3. Gradle: A build automation tool used for managing dependencies and building
projects.

Android Versions

1. Cupcake (1.5)
2. Donut (1.6)
3. Eclair (2.0 - 2.1)
4. Froyo (2.2)
5. Gingerbread (2.3 - 2.3.7)
6. Honeycomb (3.0 - 3.2.6)
7. Ice Cream Sandwich (4.0 - 4.0.4)
8. Jelly Bean (4.1 - 4.3.1)
9. KitKat (4.4 - 4.4.4)
10. Lollipop (5.0 - 5.1.1)
11. Marshmallow (6.0 - 6.0.1)
12. Nougat (7.0 - 7.1.2)
13. Oreo (8.0 - 8.1)
14. Pie (9.0)
15. Android 10 (Q)
16. Android 11
17. Android 12
18. Android 13
19. Android 14

Flash Buy - Clothing Ecommerce Application


We have created an ecommerce application that allows users to order or shop online easily
and quickly.
These orders are stored in the database and can be served by the delivery team.

Authentication
For Authentication (Login/Register) we have used Firebase Authentication Service which
allows us to securely store the email and password of our users. The password is encrypted
and handled by google itself.
We have the record of all the registered emails.

Database
For database we have used Firebase Firestore Service which is provided by Google, it allows
us to store the data into the cloud server database.
We are storing the following data in the Firebase Firestore –
1. Information of our products (men’s and women’s clothing).
2. Information of our users (address, phone number, email)
3. Information of orders placed by our users.
.

CODE –
SplashScreen.java

package com.example.flashbuy;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.widget.VideoView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;

public class SplashScreen extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_splash_screen);

new Handler().postDelayed(new Runnable() {


@Override
public void run() {
Intent i = new Intent(SplashScreen.this,Landingpage.class);
startActivity(i);
finish();
}
},3000);
}
}
SplashScreen.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SplashScreen"
android:background="@color/background">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/logo"
/>

</LinearLayout>

LandingPage.java

package com.example.flashbuy;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;

import com.airbnb.lottie.LottieAnimationView;
import com.google.firebase.auth.FirebaseAuth;

public class Landingpage extends AppCompatActivity {

LottieAnimationView l1;
Button login, register;

FirebaseAuth auth = FirebaseAuth.getInstance();

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_landingpage);

l1 = findViewById(R.id.homelottie);
l1.setVisibility(LottieAnimationView.VISIBLE);
l1.playAnimation();

if(auth.getCurrentUser()!=null)
{
// remember me logic
SharedPreferences p = getSharedPreferences("user_prefs",MODE_PRIVATE);

if(p.getBoolean("remember",false))
{
Intent intent = new Intent(Landingpage.this,MainActivity.class);
startActivity(intent);
finish();
}

register = findViewById(R.id.getstarted);
register.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(Landingpage.this,SignupActivity.class);
startActivity(i);
}
});

login = findViewById(R.id.login);

login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent i = new Intent(Landingpage.this, LoginActivity.class);
startActivity(i);
}
});
}
}

LandingPage.xml

<?xml version="1.0" encoding="utf-8"?>


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"

tools:context=".Landingpage">

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginTop="56dp"
android:layout_marginLeft="60dp"
android:src="@drawable/smalllogo"
android:id="@+id/i1"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FlashBuy"
android:textSize="45dp"
android:layout_marginLeft="130dp"
android:layout_marginTop="50dp"
android:textColor="#d4af37"
android:id="@+id/t1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Where Shopping Meets Convinience"
android:textColor="#d4af37"
android:layout_marginTop="113dp"
android:layout_marginLeft="130dp"
android:id="@+id/t2"
/>

<com.airbnb.lottie.LottieAnimationView
android:layout_width="match_parent"
android:layout_height="400dp"
app:lottie_fileName="home_shopping2.json"
android:id="@+id/homelottie"
android:layout_below="@+id/t2"
android:layout_margin="20dp"
android:visibility="gone"
app:lottie_autoPlay="true"/>

<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="Get Started"
android:layout_below="@+id/homelottie"
android:id="@+id/getstarted"
android:backgroundTint="@color/gold"
android:textColor="@color/black"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="Login"
android:layout_below="@+id/getstarted"
android:backgroundTint="@color/gold"
android:textColor="@color/black"
android:id="@+id/login"
/>
</RelativeLayout>

SignUpActivity.java

package com.example.flashbuy;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseAuthUserCollisionException;

public class SignupActivity extends AppCompatActivity {

EditText em, pass, repass;


Button signup;
CheckBox agree;

FirebaseAuth auth;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_signup);

em = findViewById(R.id.e1);
pass = findViewById(R.id.e2);
repass = findViewById(R.id.e3);
agree = findViewById(R.id.c1);
signup = findViewById(R.id.b1);

auth = FirebaseAuth.getInstance();

signup.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

String email = em.getText().toString();


String password = pass.getText().toString();
String repassword = repass.getText().toString();

if(email.isEmpty() || password.isEmpty() || repassword.isEmpty())


{
Toast.makeText(SignupActivity.this, "Please fill all the fields", Toast.LENGTH_SHORT).show();
}
else if(!agree.isChecked())
{
Toast.makeText(SignupActivity.this, "Please Agree to the terms",
Toast.LENGTH_SHORT).show();
}
else if(!password.equals(repassword))
{
Toast.makeText(SignupActivity.this, "Passwords dont match", Toast.LENGTH_SHORT).show();
}
else if(password.length()<6)
{
Toast.makeText(SignupActivity.this, "Password should be at least 6 characters",
Toast.LENGTH_SHORT).show();
}
else
{
registerUser(email,password);

}
}
});

private void registerUser(String email, String password)


{
auth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(SignupActivity.this,
new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if(task.isSuccessful())
{
Toast.makeText(SignupActivity.this, "Thank you for registering!",
Toast.LENGTH_SHORT).show();

Intent i = new Intent(SignupActivity.this,MainActivity.class);


startActivity(i);
finish();
}
else
{
try{
throw task.getException();

}
catch(FirebaseAuthUserCollisionException e)
{
Toast.makeText(SignupActivity.this,"User Already Exists!",Toast.LENGTH_SHORT).show();
}
catch(Exception e)
{
Toast.makeText(SignupActivity.this,"Registration Failed!",Toast.LENGTH_SHORT).show();
}
}
}
});
}
}

SignUpActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SignupActivity"
android:background="@color/black">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FlashBuy"
android:textSize="45dp"
android:layout_marginLeft="134dp"
android:layout_marginTop="90dp"
android:textColor="#d4af37"
android:id="@+id/t1"
/>

<ImageView
android:layout_width="90dp"
android:layout_height="90dp"
android:src="@drawable/smalllogo"
android:layout_marginTop="90dp"
android:layout_marginLeft="50dp"
android:id="@+id/i1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Where Shopping Meets Convinience"
android:textColor="#d4af37"
android:layout_marginTop="150dp"
android:layout_marginLeft="135dp"
android:id="@+id/t2"
/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="250dp"
android:hint="Email"
android:textColorHint="@color/hintGray"
android:layout_toRightOf="@+id/i2"
android:ems="8"
android:textColor="@color/white"
android:textSize="20sp"
android:layout_centerHorizontal="true"
android:inputType="text"
android:id="@+id/e1"
/>

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="325dp"
android:textColorHint="@color/hintGray"
android:layout_toRightOf="@+id/i3"
android:ems="8"
android:hint="Password"
android:textColor="@color/white"
android:textSize="20sp"
android:layout_centerHorizontal="true"
android:inputType="textPassword"
android:id="@+id/e2"
/>

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="8"
android:layout_toRightOf="@+id/i4"
android:layout_marginTop="400dp"
android:hint="Confirm Password"
android:textColorHint="@color/hintGray"
android:textColor="@color/white"
android:textSize="20sp"
android:layout_centerHorizontal="true"
android:inputType="textPassword"
android:id="@+id/e3"
/>

<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_below="@+id/e3"
android:text="Agree to the terms and conditions"
android:textColor="#d4af37"
android:textSize="18dp"
android:id="@+id/c1"
android:layout_centerHorizontal="true"
/>

<Button
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_below="@id/c1"
android:layout_marginTop="25dp"
android:text="Sign Up"
android:textSize="24dp"
android:layout_centerHorizontal="true"
android:backgroundTint="@color/gold"
android:id="@+id/b1"
android:textColor="@color/black"
/>

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/baseline_account_circle_24"
android:layout_marginTop="255dp"
android:layout_marginLeft="76dp"
android:id="@+id/i2"
/>

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/lock"
android:layout_marginTop="330dp"
android:layout_marginLeft="80dp"
android:id="@+id/i3"
/>

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/baseline_360_24"
android:layout_marginTop="405dp"
android:layout_marginLeft="80dp"
android:id="@+id/i4"
/>
</RelativeLayout>
LoginActivity.java
package com.example.flashbuy;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;

public class LoginActivity extends AppCompatActivity {

EditText em, pass;


Button login;

CheckBox remember;

FirebaseAuth auth;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_login);

em = findViewById(R.id.e1);
pass = findViewById(R.id.e2);
login = findViewById(R.id.b1);
remember = findViewById(R.id.c1);
auth = FirebaseAuth.getInstance();

login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

String email = em.getText().toString().trim();


String password = pass.getText().toString().trim();

if(email.isEmpty() || password.isEmpty())
{
Toast.makeText(LoginActivity.this, "Please fill all the fields", Toast.LENGTH_SHORT).show();
}
else
{
loginUser(email,password);
}

}
});

private void loginUser(String email, String password)


{
auth.signInWithEmailAndPassword(email,password).addOnCompleteListener(new
OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if(task.isSuccessful())
{
Toast.makeText(LoginActivity.this, "Login successful", Toast.LENGTH_SHORT).show();

if(remember.isChecked())
{
SharedPreferences p = getSharedPreferences("user_prefs",MODE_PRIVATE);
SharedPreferences.Editor editor = p.edit();
editor.putBoolean("remember",true);
editor.apply();
}

Intent i = new Intent(LoginActivity.this,MainActivity.class);


startActivity(i);
finish();
}
else
{
Toast.makeText(LoginActivity.this, "Invalid Credentials", Toast.LENGTH_SHORT).show();
}
}
});
}
}

LoginActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@color/black">

<ImageView
android:layout_width="90dp"
android:layout_height="90dp"
android:src="@drawable/smalllogo"
android:layout_marginTop="90dp"
android:layout_marginLeft="50dp"
android:id="@+id/i1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FlashBuy"
android:textSize="45dp"
android:layout_marginLeft="134dp"
android:layout_marginTop="90dp"
android:textColor="#d4af37"
android:id="@+id/t1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Where Shopping Meets Convinience"
android:textColor="#d4af37"
android:layout_marginTop="150dp"
android:layout_marginLeft="135dp"
android:id="@+id/t2"
/>

<EditText
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="256dp"
android:hint="Email"
android:textColorHint="@color/hintGray"
android:textColor="@color/white"
android:textSize="16dp"
android:layout_marginLeft="125dp"
android:inputType="text"
android:id="@+id/e1"
android:ems="8"
/>

<EditText
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="340dp"
android:hint="Password"
android:textColorHint="@color/hintGray"
android:textColor="@color/white"
android:textSize="16dp"
android:layout_marginLeft="125dp"
android:inputType="textPassword"
android:id="@+id/e2"
android:ems="8"
/>

<Button
android:id="@+id/b1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="450dp"
android:backgroundTint="@color/gold"
android:text="Login"
android:textColor="@color/black"
android:textSize="24dp" />

<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Remember me"
android:layout_marginTop="530dp"
android:layout_marginLeft="125dp"
android:textColor="#d4af37"
android:textSize="20dp"
android:id="@+id/c1"
/>

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/lock"
android:layout_marginTop="345dp"
android:layout_marginLeft="80dp"
android:id="@+id/i2"
/>

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/baseline_account_circle_24"
android:layout_marginTop="260dp"
android:layout_marginLeft="76dp"
android:id="@+id/i3"
/>
</RelativeLayout>

MainActivity.java
package com.example.flashbuy;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.google.android.material.navigation.NavigationView;

import androidx.appcompat.widget.Toolbar;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.AppCompatActivity;

import com.example.flashbuy.databinding.ActivityMainBinding;
import com.google.firebase.auth.FirebaseAuth;

public class MainActivity extends AppCompatActivity {

private AppBarConfiguration mAppBarConfiguration;


private ActivityMainBinding binding;
private TextView em;
FirebaseAuth auth = FirebaseAuth.getInstance();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
setSupportActionBar(binding.appBarMain.toolbar);

setupDrawerAndNavigation();

Toolbar toolbar = findViewById(R.id.toolbar);


setSupportActionBar(toolbar);

getSupportActionBar().setTitle("FlashBuy");

public void setupDrawerAndNavigation() {


DrawerLayout drawer = binding.drawerLayout;
NavigationView navigationView = binding.navView;

mAppBarConfiguration = new AppBarConfiguration.Builder(


R.id.nav_home, R.id.nav_menswear, R.id.nav_womenswear,R.id.nav_orders)
.setOpenableLayout(drawer)
.build();

NavController navController = Navigation.findNavController(this,


R.id.nav_host_fragment_content_main);
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
NavigationUI.setupWithNavController(navigationView, navController);

View navHeader = navigationView.getHeaderView(0); // accessing the navigation header main .xml file.
em = navHeader.findViewById(R.id.t2);
em.setText(auth.getCurrentUser().getEmail());
navigationView.setNavigationItemSelectedListener(item -> {

if(item.getItemId()==R.id.nav_logout)
{
auth.signOut();
Intent i = new Intent (MainActivity.this,Landingpage.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); //
closes any other activities that were in the stack
startActivity(i);

SharedPreferences p = getSharedPreferences("user_prefs",MODE_PRIVATE);
SharedPreferences.Editor editor = p.edit();
editor.putBoolean("remember",false);
editor.apply();

finish();
return true;
}
else
{
navController.navigate(item.getItemId());
drawer.closeDrawers();
return false;
}
});
}

@Override
public boolean onSupportNavigateUp() {
NavController navController = Navigation.findNavController(this,
R.id.nav_host_fragment_content_main);
return NavigationUI.navigateUp(navController, mAppBarConfiguration) || super.onSupportNavigateUp();
}
}

MainActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
android:id="@+id/app_bar_main"
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:background="@color/black"
app:itemIconTint="@color/hintGray"
app:itemTextColor="@color/white"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />

</androidx.drawerlayout.widget.DrawerLayout>

HomeFragment.java
package com.example.flashbuy.ui.home;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;

import com.example.flashbuy.R;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;

public class HomeFragment extends Fragment {


ImageView mtshirt, mtrouser, mblue, mred;
ImageView ftshirt, fcargo, fshirt, fjeans;
RelativeLayout menswear, womenswear;
FirebaseFirestore db = FirebaseFirestore.getInstance();

@Override
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.fragment_home, container, false);

mtshirt = rootView.findViewById(R.id.mtshirt);
mtrouser = rootView.findViewById(R.id.mtrouser);
mblue = rootView.findViewById(R.id.mblue);
mred = rootView.findViewById(R.id.mred);

ftshirt = rootView.findViewById(R.id.ftshirt);
fcargo = rootView.findViewById(R.id.fcargo);
fshirt = rootView.findViewById(R.id.fshirt);
fjeans = rootView.findViewById(R.id.fjeans);

menswear = rootView.findViewById(R.id.rc1);
womenswear = rootView.findViewById(R.id.rc2);

menswear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController navController =
Navigation.findNavController(getActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_menswear_fragment);
}
});

womenswear.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController navController =
Navigation.findNavController(getActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_womenswear_fragment);
}
});

mtshirt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("MensWear","Tshirts","tshirt1");
}
});

mtrouser.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("MensWear","Trousers","trouser3");
}
});

mblue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("MensWear","Shirts","shirt1");
}
});

mred.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("MensWear","Suits","suit4");
}
});

ftshirt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("WomensWear","TShirts","tshirt3");
}
});

fcargo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("WomensWear","Cargos","cargo6");
}
});

fshirt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("WomensWear","Tops","top5");
}
});

fjeans.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openProduct("WomensWear","Jeans","jeans2");
}
});

return rootView;
}

private void openProduct(String Gender, String Category, String productNameInDatabase)


{
DocumentReference dr =
db.collection(Gender).document(Category).collection(Category).document(productNameInDatabase);

dr.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {

DocumentSnapshot doc = task.getResult();

Bundle b = new Bundle();


b.putString("img",doc.getString("image"));
b.putString("img2",doc.getString("image2"));
b.putString("brand",doc.getString("brand"));
b.putString("desc",doc.getString("desc"));
b.putString("price",doc.getString("price"));
b.putString("fabric",doc.getString("fabric"));
b.putString("color",doc.getString("color"));

NavController navController =
Navigation.findNavController(getActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_detailed_fragment,b);
}
});
}
}

HomeFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ui.home.HomeFragment">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">

<RelativeLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:layout_marginLeft="80dp"
android:src="@drawable/smalllogo"
android:id="@+id/i1"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FlashBuy"
android:textSize="27dp"
android:layout_marginLeft="130dp"
android:layout_marginTop="10dp"
android:textColor="#d4af37"
android:id="@+id/t1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Where Shopping Meets Convinience"
android:textColor="#d4af37"
android:layout_marginTop="43dp"
android:layout_marginLeft="130dp"
android:textSize="13sp"
android:id="@+id/t2"
/>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="90dp"
android:id="@+id/l1"
>
<ImageView
android:layout_width="35dp"
android:layout_height="40dp"
android:src="@drawable/line1"
android:id="@+id/i2"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="15dp"
android:text="Welcome"
android:textSize="25dp"
android:textColor="@color/white"
android:id="@+id/t3"
/>

<ImageView
android:layout_width="35dp"
android:layout_height="40dp"
android:src="@drawable/line1"
android:layout_marginLeft="15dp"
android:id="@+id/i3"
/>
</LinearLayout>

<TextView
android:id="@+id/centerline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/l2"
android:text=""
android:textColor="@color/white" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/l1"
android:layout_centerHorizontal="true"
android:id="@+id/l2"
android:layout_marginTop="40dp"
android:layout_marginLeft="20dp"
android:paddingRight="100dp"
>
<TextView
android:id="@+id/t5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Popular in Men's wear"
android:textColor="#d4af37"
android:textSize="20dp" />

<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/man"
android:id="@+id/i6"
android:layout_marginRight="120dp"
/>
</LinearLayout>

<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/l2"
android:id="@+id/l3"
android:layout_toRightOf="@+id/centerline"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:scrollbars="none"
>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/mwhite"
android:id="@+id/mtshirt"
/>

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/mtrouser"
android:id="@+id/mtrouser"
/>

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/mblue"
android:id="@+id/mblue"
/>

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/mred"
android:id="@+id/mred"
/>

</LinearLayout>
</HorizontalScrollView>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/l4"
android:layout_below="@+id/l3"
android:layout_marginTop="40dp"
android:layout_centerHorizontal="true"
android:layout_marginLeft="10dp"
android:paddingRight="100dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Popular in Women's wear"
android:textColor="#d4af37"
android:textSize="20dp"
android:id="@+id/t7"
/>

<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/woman"
android:id="@+id/i9"
android:layout_marginRight="100dp"
/>
</LinearLayout>
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/l4"
android:id="@+id/l5"
android:layout_marginTop="20dp"
android:layout_centerHorizontal="true"
android:layout_toRightOf="@+id/centerline"
android:scrollbars="none">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/fblack"
android:id="@+id/ftshirt"
/>

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/fcargo"
android:id="@+id/fcargo"
/>

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/fwhite"
android:id="@+id/fshirt"
/>

<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/fjeans"
android:id="@+id/fjeans"
/>

</LinearLayout>
</HorizontalScrollView>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/r1"
android:layout_below="@+id/l5"
android:layout_marginTop="40dp"
android:layout_centerHorizontal="true">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/rc1">

<ImageView
android:layout_width="130dp"
android:layout_height="130dp"
android:src="@drawable/mwear"
android:layout_marginTop="35dp"
android:layout_marginLeft="20dp"
android:id="@+id/i4"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Men's Wear"
android:layout_marginTop="180dp"
android:textColor="#d4af37"
android:layout_marginLeft="35dp"
android:textSize="20dp"
android:id="@+id/t4"
/>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/off"
android:id="@+id/i5"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/rc2"
android:layout_toRightOf="@+id/rc1"
android:layout_marginLeft="30dp">

<ImageView
android:layout_width="130dp"
android:layout_height="130dp"
android:src="@drawable/wwear"
android:layout_marginTop="35dp"
android:layout_marginLeft="25dp"
android:id="@+id/i7"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Women's Wear"
android:layout_marginTop="180dp"
android:textColor="#d4af37"
android:layout_marginLeft="35dp"
android:textSize="20dp"
android:id="@+id/t6"
/>
<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/off"
android:id="@+id/i8"
/>
</RelativeLayout>
</LinearLayout>

<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
android:src="@drawable/arrowright"
android:layout_marginTop="80dp"
android:layout_marginLeft="10dp"
android:id="@+id/i13"
/>

<ImageView
android:layout_width="35dp"
android:layout_height="35dp"
android:src="@drawable/arrowleft"
android:layout_marginTop="80dp"
android:layout_marginRight="10dp"
android:layout_alignParentRight="true"
android:id="@+id/i14"
/>

</RelativeLayout>

</RelativeLayout>

</ScrollView>

</LinearLayout>

MensWearFragment.java
package com.example.flashbuy.ui.MensWear;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import com.example.flashbuy.R;

public class MensWearFragment extends Fragment {

RelativeLayout tshirt,shirt,trouser,suit;

@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_menswear, container, false);

tshirt = rootView.findViewById(R.id.op1);
shirt = rootView.findViewById(R.id.op2);
trouser = rootView.findViewById(R.id.op3);
suit = rootView.findViewById(R.id.op4);
tshirt.setOnClickListener(v -> {
NavController navController = Navigation.findNavController(requireActivity(),
R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_tshirt_fragment);
});

shirt.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController nav =
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_content_main);
nav.navigate(R.id.action_to_shirt_fragment);
}
});

trouser.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController nav =
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_content_main);
nav.navigate(R.id.action_to_trouser_fragment);
}
});

suit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController nav =
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_content_main);
nav.navigate(R.id.action_to_suit_fragment);
}
});

return rootView;
}
}

MensWearFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ui.MensWear.MensWearFragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cardbackground"
android:id="@+id/op1"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>
<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i1"
android:src="@drawable/tshirt"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-Shirt"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cardbackground"
android:id="@+id/op2"
android:layout_below="@+id/op1"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i2"
android:src="@drawable/shirt2"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shirt"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cardbackground"
android:id="@+id/op3"
android:layout_below="@+id/op2"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i3"
android:src="@drawable/trousers"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Trouser"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/cardbackground"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:id="@+id/op4"
android:layout_below="@+id/op3"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i4"
android:src="@drawable/suit"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Suit"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>

</RelativeLayout>

</RelativeLayout>

ShirtFragment.java
package com.example.flashbuy.ui.MensWear;

import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.flashbuy.CardAdapter;
import com.example.flashbuy.CardModel;
import com.example.flashbuy.R;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QuerySnapshot;

import java.util.ArrayList;

public class ShirtFragment extends Fragment {

ArrayList<CardModel> list = new ArrayList<>();


FirebaseFirestore db = FirebaseFirestore.getInstance();
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.fragment_shirt, container, false);

RecyclerView recyclerView = rootView.findViewById(R.id.recycler);

recyclerView.setLayoutManager(new GridLayoutManager(getContext(),2));

CardAdapter cardAdapter = new CardAdapter(requireActivity(),getContext(),list);

recyclerView.setAdapter(cardAdapter);

loadShirts(cardAdapter);

return rootView;
}

private void loadShirts(CardAdapter cardAdapter)


{
db.collection("MensWear").document("Shirts").collection("Shirts")
.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {

list.clear();

for(DocumentSnapshot doc : task.getResult())


{
String img1 = doc.getString("image");
String brand = doc.getString("brand");
String price = doc.getString("price");

String img2 = doc.getString("image2");


String desc = doc.getString("desc");
String color = doc.getString("color");
String fabric = doc.getString("fabric");

list.add(new CardModel(img1,brand,price,img2,desc,color,fabric));
}
cardAdapter.notifyDataSetChanged();
}
});
}
}

ShirtFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ui.MensWear.ShirtFragment">

<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler"
/>

</FrameLayout>

WomensWearFragment.java
package com.example.flashbuy.ui.WomensWear;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import com.example.flashbuy.R;

public class WomensWearFragment extends Fragment {

RelativeLayout op1,op2,op3,op4;

@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_womenswear,container,false);
op1 = rootView.findViewById(R.id.op1);
op2 = rootView.findViewById(R.id.op2);
op3 = rootView.findViewById(R.id.op3);
op4 = rootView.findViewById(R.id.op4);

op1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController navController = Navigation.findNavController(requireActivity(),
R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_tshirt_fragment2);
}
});

op2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController navController =
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_top_fragment);
}
});

op3.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController navController =
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_jeans_fragment);
}
});

op4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavController navController =
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_cargo_fragment);
}
});
return rootView;
}
}

WomensWearFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ui.WomensWear.WomensWearFragment">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/op1"
android:background="@drawable/cardbackground"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i1"
android:src="@drawable/wtshirt"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="T-Shirt"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/op2"
android:layout_below="@+id/op1"
android:background="@drawable/cardbackground"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i2"
android:src="@drawable/top"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Top"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/op3"
android:layout_below="@+id/op2"
android:background="@drawable/cardbackground"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i3"
android:src="@drawable/jeans"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Jeans"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/op4"
android:layout_below="@+id/op3"
android:background="@drawable/cardbackground"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="20dp"
android:padding="30dp"
>

<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/i4"
android:src="@drawable/cargo"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cargo"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:textSize="30sp"
android:textColor="@color/gold"/>

</RelativeLayout>
</RelativeLayout>

JeansFragment.java
package com.example.flashbuy.ui.WomensWear;

import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.flashbuy.CardAdapter;
import com.example.flashbuy.CardModel;
import com.example.flashbuy.R;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;
import com.google.firebase.firestore.QuerySnapshot;
import java.util.ArrayList;

public class JeansFragment extends Fragment {

RecyclerView recyclerView;
ArrayList<CardModel> Alist = new ArrayList<>();

FirebaseFirestore db=FirebaseFirestore.getInstance();

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_t_shirt2, container, false);

recyclerView = rootView.findViewById(R.id.recycler);
recyclerView.setLayoutManager(new GridLayoutManager(getContext(),2));

db.collection("WomensWear").document("Jeans").collection("Jeans")
.get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
@Override
public void onComplete(@NonNull Task<QuerySnapshot> task) {
Alist.clear();
for(DocumentSnapshot doc : task.getResult())
{
String img1 = doc.getString("image");
String brand = doc.getString("brand");
String price = doc.getString("price");

String img2 = doc.getString("image2");


String desc = doc.getString("desc");
String color = doc.getString("color");
String fabric = doc.getString("fabric");

Alist.add(new CardModel(img1,brand,price,img2,desc,color,fabric));
}
CardAdapter cardAdapter = new CardAdapter(requireActivity(),getContext(),Alist);
recyclerView.setAdapter(cardAdapter);

}
});

return rootView;
}
}

JeansFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ui.WomensWear.JeansFragment">

<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/recycler"
/>
</FrameLayout>

CardModel.java (Recycler View)


package com.example.flashbuy;

public class CardModel {

public String imgLink,brand,price, desc,fabric,color,img2Link;

public CardModel(String imgLink, String brand, String price, String img2Link, String desc, String color,
String fabric)
{
this.imgLink = imgLink;
this.brand = brand;
this.price = price;

this.desc = desc;
this.fabric = fabric;
this.color = color;
this.img2Link = img2Link;
}
}
CardAdapter.java (Recycler View)
package com.example.flashbuy;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.*;
import android.widget.*;
import androidx.annotation.NonNull;
import androidx.navigation.*;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import java.util.ArrayList;

public class CardAdapter extends RecyclerView.Adapter<CardAdapter.ViewHolder> {

Context context;
ArrayList<CardModel> list;
Activity activity;

public CardAdapter(Activity activity, Context context, ArrayList<CardModel> list)


{
this.context = context;
this.list = list;
this.activity = activity;

@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.card, parent, false);
ViewHolder viewHolder = new ViewHolder(view);
return viewHolder;
}

@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

Glide.with(context)
.load(list.get(position).imgLink)
.apply(new RequestOptions()
.placeholder(R.drawable.profile) // Add a placeholder image
.diskCacheStrategy(DiskCacheStrategy.ALL)) // Cache both original & resized versions
.into(holder.img);
holder.txtBrand.setText(list.get(position).brand);
holder.txtPrice.setText("₹" + list.get(position).price);
}

@Override
public int getItemCount() {
return list.size();
}

public class ViewHolder extends RecyclerView.ViewHolder{


ImageView img;
TextView txtBrand, txtPrice;
public ViewHolder(@NonNull View itemView) {
super(itemView);

img = itemView.findViewById(R.id.image);
txtBrand = itemView.findViewById(R.id.brand);
txtPrice = itemView.findViewById(R.id.price);

itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

int pos = getBindingAdapterPosition();


Bundle b = new Bundle();
b.putString("img",list.get(pos).imgLink);
b.putString("img2",list.get(pos).img2Link);
b.putString("brand",list.get(pos).brand);
b.putString("desc",list.get(pos).desc);
b.putString("price",list.get(pos).price);
b.putString("fabric",list.get(pos).fabric);
b.putString("color",list.get(pos).color);

NavController navController =
Navigation.findNavController(activity,R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_detailed_fragment,b);
}
});
}
}
}
DetailedFragment.java
package com.example.flashbuy;

import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;

public class DetailedFragment extends Fragment {

TextView brand,desc,price,color,fabric;
ImageView img1,img2;

Button buy;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_detailed, container, false);

Bundle data = getArguments();

brand = rootView.findViewById(R.id.brand);
desc = rootView.findViewById(R.id.desc);
price = rootView.findViewById(R.id.price);
color = rootView.findViewById(R.id.color);
fabric = rootView.findViewById(R.id.fabric);
img1 = rootView.findViewById(R.id.img1);
img2 = rootView.findViewById(R.id.img2);
buy = rootView.findViewById(R.id.buynow);

brand.setText(data.getString("brand"));
desc.setText(data.getString("desc"));
price.setText("₹" + data.getString("price"));
color.setText(data.getString("color"));
fabric.setText(data.getString("fabric"));

Glide.with(getContext())
.load(data.getString("img"))
.into(img1);

Glide.with(getContext())
.load(data.getString("img2"))
.into(img2);

buy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

Bundle b = new Bundle();


b.putString("brand",data.getString("brand"));
b.putString("price",data.getString("price"));
b.putString("desc",data.getString("desc"));
b.putString("img",data.getString("img"));
NavController navController =
Navigation.findNavController(getActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_action_settings,b);
}
});

return rootView;
}
}

DetailedFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/secback"
tools:context=".DetailedFragment">

<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/brand"
android:textStyle="bold"
android:textSize="26sp"
android:textColor="@color/white"
android:layout_marginHorizontal="20dp"
android:text=""
android:textAlignment="textStart"
android:layout_marginTop="20dp"
/>

<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/img1"
android:layout_below="@+id/brand"
android:layout_margin="20dp"/>

<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/img2"
android:layout_below="@+id/img1"
android:layout_margin="20dp"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/img2"
android:textColor="@color/hintGray"
android:id="@+id/desc"
android:textSize="22sp"
android:layout_marginHorizontal="20dp"
android:layout_marginBottom="20dp"
android:text=" "
android:textAlignment="center"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/desc"
android:textColor="@color/hintGray"
android:id="@+id/price"
android:textSize="24sp"
android:layout_marginHorizontal="20dp"
android:text=" "
android:textAlignment="center"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/price"
android:textColor="@color/hintGray"
android:id="@+id/color"
android:textSize="18sp"
android:layout_margin="20dp"
android:text=" "
android:textAlignment="center"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/color"
android:textColor="@color/hintGray"
android:id="@+id/fabric"
android:textSize="18sp"
android:layout_marginHorizontal="20dp"
android:text=" "
android:textAlignment="center"
/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:id="@+id/buynow"
android:textColor="@color/black"
android:text="Buy Now"
android:backgroundTint="@color/gold"
android:layout_below="@+id/fabric”/>
</RelativeLayout>
</ScrollView>
</FrameLayout>

ProfileFragment.java
package com.example.flashbuy;

import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;

import java.util.HashMap;

public class ProfileFragment extends Fragment {


ActionBar actionBar;

FirebaseFirestore db = FirebaseFirestore.getInstance();
FirebaseAuth auth = FirebaseAuth.getInstance();

EditText fullname, phone, streetAddress, city, pincode, landmark;

Button next;

Bundle data;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.fragment_profile, container, false);

data = getArguments();
fullname = rootView.findViewById(R.id.e0);
phone = rootView.findViewById(R.id.e1);
streetAddress = rootView.findViewById(R.id.e2);
city = rootView.findViewById(R.id.e3);
pincode = rootView.findViewById(R.id.e4);
landmark = rootView.findViewById(R.id.e5);
next = rootView.findViewById(R.id.b1);

String email = auth.getCurrentUser().getEmail();

db.collection("Address").document(email).get().addOnCompleteListener(new
OnCompleteListener<DocumentSnapshot>() {
@Override
public void onComplete(@NonNull Task<DocumentSnapshot> task) {
if(task.isSuccessful() && task.getResult().exists())
{
DocumentSnapshot d = task.getResult();
fullname.setText(d.get("fullname").toString());
phone.setText(d.get("phone").toString());
streetAddress.setText(d.get("streetAddress").toString());
city.setText(d.get("city").toString());
pincode.setText(d.get("pincode").toString());
landmark.setText(d.get("landmark").toString());
}
else if(task.isSuccessful() && !task.getResult().exists())
{
Toast.makeText(getContext(), "You are new!", Toast.LENGTH_SHORT).show();
}
else
{
Toast.makeText(getContext(), "Could not Fetch", Toast.LENGTH_SHORT).show();
}
}
});

next.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String txtFullName = fullname.getText().toString().trim();
String txtPhone = phone.getText().toString().trim();
String txtStreetAddress = streetAddress.getText().toString().trim();
String txtCity = city.getText().toString().trim();
String txtPincode = pincode.getText().toString().trim();
String txtLandmark = landmark.getText().toString().trim();

if(TextUtils.isEmpty(txtFullName) || TextUtils.isEmpty(txtPhone) ||
TextUtils.isEmpty(txtStreetAddress) || TextUtils.isEmpty(txtCity) || TextUtils.isEmpty(txtPincode) ||
TextUtils.isEmpty(txtLandmark))
{
Toast.makeText(getContext(), "Please fill all the fields", Toast.LENGTH_SHORT).show();
}
else if(txtPhone.length() != 10)
{
Toast.makeText(getContext(), "Invalid Phone Number!", Toast.LENGTH_SHORT).show();
}
else
{
HashMap<String,String> map = new HashMap<>();
map.put("fullname",txtFullName);
map.put("phone",txtPhone);
map.put("streetAddress",txtStreetAddress);
map.put("city",txtCity);
map.put("pincode",txtPincode);
map.put("landmark",txtLandmark);

db.collection("Address").document(auth.getCurrentUser().getEmail()).set(map);

NavController navController =
Navigation.findNavController(getActivity(),R.id.nav_host_fragment_content_main);
data.putString("streetaddress",txtStreetAddress);
data.putString("city",txtCity);
data.putString("pincode",txtPincode);
data.putString("landmark",txtLandmark);
navController.navigate(R.id.action_to_payment,data);
}
}
});

return rootView;
}
}

ProfileFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".ProfileFragment">
<RelativeLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="30dp"
android:gravity="start"
>

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginBottom="20dp"
android:layout_centerHorizontal="true"
android:id="@+id/toplogo">

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:src="@drawable/smalllogo"
android:id="@+id/i0"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FlashBuy"
android:textSize="27dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="10dp"
android:textColor="#d4af37"
android:id="@+id/t1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Where Shopping Meets Convinience"
android:textColor="#d4af37"
android:layout_marginTop="43dp"
android:layout_marginLeft="50dp"
android:textSize="13dp"
android:id="@+id/t2"
/>

</RelativeLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="wrap_content"
android:layout_below="@+id/toplogo"
android:layout_marginTop="30dp"
android:gravity="center"
android:id="@+id/l1">

<ImageView
android:id="@+id/i1"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/profile"
android:layout_marginRight="10dp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Full Name"
android:textColorHint="@color/hintGray"
android:textColor="@color/white"
android:textSize="25sp"
android:inputType="text"
android:id="@+id/e0"
/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_below="@+id/l1"
android:gravity="center"
android:id="@+id/l2">

<ImageView
android:id="@+id/i5"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/phone"
android:layout_marginRight="10dp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Phone"
android:textColor="@color/white"
android:textColorHint="@color/hintGray"
android:textSize="25sp"
android:inputType="number"
android:id="@+id/e1"
/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:gravity="center"
android:id="@+id/l3"
android:layout_below="@+id/l2">

<ImageView
android:id="@+id/i4"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/address"
android:layout_marginRight="10dp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Street Address"
android:textColor="@color/white"
android:textColorHint="@color/hintGray"
android:textSize="25sp"
android:inputType="text"
android:id="@+id/e2"
/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:gravity="center"
android:layout_below="@+id/l3"
android:id="@+id/l4">

<ImageView
android:id="@+id/i6"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/city"
android:layout_marginRight="10dp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter City"
android:textColor="@color/white"
android:textColorHint="@color/hintGray"
android:textSize="25sp"
android:inputType="text"
android:id="@+id/e3"
/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:gravity="center"
android:layout_below="@+id/l4"
android:id="@+id/l5">

<ImageView
android:id="@+id/i7"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/pincode"
android:layout_marginRight="10dp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Pincode"
android:textColor="@color/white"
android:textColorHint="@color/hintGray"
android:textSize="25sp"
android:inputType="number"
android:id="@+id/e4"
/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_marginRight="20dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"

android:gravity="center"
android:layout_below="@+id/l5"
android:id="@+id/l6">

<ImageView
android:id="@+id/i8"
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/landmark"
android:layout_marginRight="10dp"/>

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Landmark"
android:textColor="@color/white"
android:textColorHint="@color/hintGray"
android:textSize="25sp"
android:inputType="text"
android:id="@+id/e5"
/>
</LinearLayout>

<Button
android:layout_width="300dp"
android:layout_height="55dp"
android:text="Next"
android:layout_centerHorizontal="true"
android:textColor="#FFFFFF"
android:textSize="25sp"
android:backgroundTint="#d4af37"
android:layout_marginTop="50dp"
android:id="@+id/b1"
android:layout_below="@+id/l6"
/>

</RelativeLayout>
</FrameLayout>

PaymentFragment.java
package com.example.flashbuy;

import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;

public class PaymentFragment extends Fragment {

RadioGroup paymentMethod;
Bundle data;
Button b1;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.fragment_payment, container, false);


data = getArguments();

paymentMethod = rootView.findViewById(R.id.paymentMethod);
b1 = rootView.findViewById(R.id.b1);

b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
RadioButton rb = rootView.findViewById(paymentMethod.getCheckedRadioButtonId());

data.putString("paymentmethod", rb.getText().toString());

NavController navController =
Navigation.findNavController(getActivity(),R.id.nav_host_fragment_content_main);
navController.navigate(R.id.action_to_bill,data);
}
});
return rootView;
}
}

PaymentFragment.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".PaymentFragment">

<RelativeLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginBottom="20dp"
android:layout_centerHorizontal="true"
android:id="@+id/toplogo">

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginTop="10dp"
android:src="@drawable/smalllogo"
android:id="@+id/i0"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FlashBuy"
android:textSize="27dp"
android:layout_marginLeft="50dp"
android:layout_marginTop="10dp"
android:textColor="#d4af37"
android:id="@+id/t1"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Where Shopping Meets Convinience"
android:textColor="#d4af37"
android:layout_marginTop="43dp"
android:layout_marginLeft="50dp"
android:textSize="13dp"
android:id="@+id/t2"
/>
</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select a payment method"
android:layout_marginTop="84dp"
android:textSize="25dp"
android:textColor="#dfbcff"
android:layout_centerHorizontal="true"
android:id="@+id/t3"
android:layout_marginLeft="5dp"
/>

<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="80dp"
android:layout_toLeftOf="@+id/t3"
android:src="@drawable/select"
android:id="@+id/i6"/>

</RelativeLayout>

<RadioGroup
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
android:id="@+id/paymentMethod"
>

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="180dp"
android:layout_marginLeft="20dp"
android:text="Cash on Delivery"
android:checked="true"
android:textColor="#d4af37"
android:textSize="20dp"
android:id="@+id/r1"
/>

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="55dp"
android:layout_marginLeft="20dp"
android:text="Credit or Debit Card"
android:textColor="#d4af37"
android:textSize="20dp"
android:id="@+id/r2"
/>

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="42dp"
android:layout_marginLeft="20dp"
android:text="UPI Apps"
android:textColor="#d4af37"
android:textSize="20dp"
android:id="@+id/r3"
/>

<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:text="Net Banking"
android:textColor="#d4af37"
android:textSize="20dp"
android:id="@+id/r4"
/>
</RadioGroup>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="160dp"
android:textColor="@color/white"
android:text="COD"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:id="@+id/t7"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="260dp"
android:textColor="@color/white"
android:text="Credit or Debit Cards"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:id="@+id/t4"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="350dp"
android:textColor="@color/white"
android:text="UPI"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:id="@+id/t5"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="440dp"
android:textColor="@color/white"
android:text="More ways to pay"
android:textSize="18dp"
android:layout_marginLeft="20dp"
android:id="@+id/t6"
/>

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/symbols"
>

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:src="@drawable/cash"
android:layout_marginTop="180dp"
android:layout_marginRight="40dp"
android:layout_alignParentRight="true"
android:id="@+id/i2"
/>

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_alignParentRight="true"
android:layout_marginTop="280dp"
android:layout_marginRight="40dp"
android:src="@drawable/card"
android:id="@+id/i3"
/>

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginTop="370dp"
android:layout_alignParentRight="true"
android:layout_marginRight="40dp"
android:src="@drawable/upi"
android:id="@+id/i4"
/>

<ImageView
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginTop="460dp"
android:layout_alignParentRight="true"
android:layout_marginRight="40dp"
android:src="@drawable/bank"
android:id="@+id/i7"
/>
</RelativeLayout>

<Button
android:layout_width="match_parent"
android:layout_height="60dp"

android:layout_marginLeft="55dp"
android:layout_marginTop="60dp"
android:text="Continue"
android:textColor="@color/gold"
android:textSize="23dp"
android:backgroundTint="@color/btnbackground"
android:layout_centerHorizontal="true"
android:id="@+id/b1"
android:layout_below="@id/symbols"
/>

</RelativeLayout>

</FrameLayout>

Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@drawable/smalllogo"
android:label="@string/app_name"
android:roundIcon="@drawable/smalllogo"
android:supportsRtl="true"
android:theme="@style/Theme.FlashBuy"
tools:targetApi="31">

<activity
android:name=".SignupActivity"
android:exported="false"
android:theme="@style/Theme.FlashBuy.NoActionBar" />

<activity
android:name=".LoginActivity"
android:exported="false"
android:theme="@style/Theme.FlashBuy.NoActionBar" />
<activity
android:name=".Landingpage"
android:exported="false"
android:theme="@style/Theme.FlashBuy.NoActionBar" />

<activity
android:name=".SplashScreen"
android:exported="true"
android:theme="@style/Theme.FlashBuy.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.FlashBuy.NoActionBar" />
</application>

</manifest>
OUTPUTS :
Conclusion:
After six weeks of training in Android development with Jellyfish, our team successfully
created this e-commerce application. Through this project, we learned how to build mobile
apps, design user-friendly interfaces, and add important features. We're excited about what
we've achieved and look forward to improving the app based on user feedback. This
experience has prepared us well for future projects in mobile app development

You might also like