Вы находитесь на странице: 1из 34

KISAAN MARKET

(Mobile Application)
A Project Work
Submitted as Major Project in Partial fulfillment for the award of Graduate Degree in
Bachelor of Engineering in Computer Science & Engineering.

Submitted to
RAJIV GANDHI PROUDYOGIKI VISHWAVIDYALAYA
BHOPAL (M.P)

Submitted By—
Abhishek Anand (0126CS151003)
Alok Pandey (0126CS151010)

Under the Guidance of


Assis Prof. Apporva Shrivastava
(Department of Computer Science & Engineering)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


JAN-JUNE 2018

1
CERTIFICATE

This is to certify that the project entitled “KISAAN MARKET” being


submitted by Abhishek Anand & Alok Pandey student of 6th Semester,
Degree in Computer Science & Engineering have done their work as
MINOR PROJECT for Partial fulfillment of the degree from RGPV,
Bhopal (M.P.) is a record of bonafide work carried out by them/him/her
under our supervision.

Prof. Apporva Shrivastava Prof. L.K Vishwamitra


Guide Head
Department of Department of
Computer Science & Engineering Computer Science & Engineering

2
ACKNOWLEDGEMENT

We would like to give thanks to our guide Assis Prof Apporva


Shrivastava mam to guide us in making this project possible.

Also we are grateful towards our management of Computer Science


Engineering at Oriental College Of Technology for providing their
students a platform to come forward and share their ideas with
everyone else.

3
Table of contents
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Overview of the document
1.4 References
1.5 Product function
1.6 General constraints
1.7 Hardware requirements
1.8 Software requirements
1.9 Technologies and tool used
1.10 Dependencies
1.11 Feasibility study
2. Implementation Requirements
2.1 Front-End
2.1 Back-End
3 Functional Requirements
4 Non Functional Requirements
5 Application
5.1 Advantage
5.2 Disadvantage
6 Diagrams
7 Additional Features
8 Database
9 Screen Short
10 Coding
11 About Team
12 conclusion

4
1. Introduction

In rural areas the farmers have no more idea about agriculture product like grain
its quality and better price. This application save our time because we can easily
find information about different types of grains and it’s price. We know previous
years there are many crises happened in all over India. This application helps to
know about that crises. People can also updated about the prices of the grain
citywise.
1.1 Purpose
The purpose of our application is to help those famers who have no
more knowledge about agricultural Grain Product and price.
1.2 Scope
Our tools can be enhanced further to involve as many can further
link a number of Government sites to our tool so that we can enable common
people access to various government facilities available in India.
1.3 Overview of the Document
The Requirements Specification captures system requirements for the
following areas: functionality, usability, reliability, performance, supportability
and the design constraints.

1.4 General Constraints


1.4.1 Hardware Requirement
 Android Mobile
 Processor :3 MHz or above

 Ram : 500 Mb or above

1.4.2 Software Requirements


 Operating System :Android KitKat (or above)

5
 Android Studio

 JDK

 Window 7 (or above)

 MS-Office

1.5 Dependencies
This Software requires Android Device.

1.6 Feasibility study


A feasibility Study performed by a company when they want to know
whether a project is possible under given circumstances.
1. Economic feasibility:-It is economically feasible because it does not require
any extra cost other than software and hardware requirement.
2. Technical Feasibility:-It is technically feasible because nowadays everone
own Smart Phone
3. Social Feasibility:-User can use it from anywhere anytime.
4. Marketing Feasibility:- It is feasible because it provides a better option for
farmer to easily find their Grain product information.
5. Operational Feasibility:- All the common people can use it to search
information about the Grain product.
6. Legal feasibility:-The application is legally feasible because all the
information provided to the people is taken from the agriculture department.

7. Economic feasibility:-It is economically feasible because it does not require


any extra cost other than software and hardware requirement.

1.7 Functional Requirements

6
This section of the document illustrates different functions provided by the
application:
 It provides search capabilities of different product over the country.
 It provides availability of quantity and quality.
 Along with this people can find price along with their city.

1.8 Non-functional Requirements


The person should have an elementary knowledge of using Smart Phone.

1.9 DESIGN CONSTRAINTS

The application is designed using Android Studio (IDE) and all the coding is done in core
java and XML.

1.10 SOFTWARE SYSTEM ATTRIBUTES:


Availability:The application should be available 24/7.It should always provide
real time information.
Reliability:The application is robust enough to have a high degree of fault
tolerance. The application does not crash and identifies the invalid input and
produces a suitable error message. It is also able to recover from hardware
failures.
Usability:The application provides an easy-to-use the quantity, quality and
better price of grain product citywiseso that people have no need to search here
and there. Users are able to understand the menu and options provided bythe
application. Any notification or error messages generated is very clear, polite.

2 Implementation Requirment
2.1 Front-End

7
The application is designed using Android Studio (IDE) and all the coding is done in core
java and XML.
Availability:The application should be available 24/7.It should always provide
real time information.
Reliability:The application is robust enough to have a high degree of fault
tolerance. The application does not crash and identifies the invalid input and
produces a suitable error message. It is also able to recover from hardware
failures.
Usability:The application provides an easy-to-use the quantity, quality and better
price of grain product citywise so that people have no need to search here and
there. Users are able to understand the menu and options provided by the
application. Any notification or error messages generated is very clear, polite.

2.2 Back-End
Back-End of Application uses Android Firebase

3. Application
3.1 Advantage
 This application is to help those famers who have no more knowledge
about agricultural Grain Product and price.

 This application save our time because we can easily find information
about different types of grains and it’s price.

 3. This application helps to know about that crises. People can also
updated about the prices of the grain citywise.

 4. The application provides an easy-to-use the quantity, quality and


better price of grain product citywise so that people have no need to
search here and there.

 5. Buyer can also known the international news about grain.

8
 If buyer has any problem or any confusion related to grain than he
candiscuss with seller.

3.2 Disadvantage

 1.The rate of grain or grain is available only in some fix city.

 2. Language which we will used for communication is english so


some buyer has a problem with communication

4.Diagram:

4.1User login

9
4.2 Class Diagram

4.3 Class Diagram

7. Additional features:
7.1Mapping feature:
Mapping feature is one of the most important featureespecially for the
dealer.Dealer will find the minimum possible path to transfer the product to the
customer in cheap and efficient way.It will reduce the cost.

10
8. Database

Real Time Database

User Database

11
9.Screen Shot
Login page

12
Welcome page

13
Home page

14
Gallery page

15
16
10.Coding
Main Activity.java
package com.example.android.kisaanmarket;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.yasic.library.particletextview.MovingStrategy.RandomMovingStrategy;
import com.yasic.library.particletextview.Object.ParticleTextViewConfig;
import com.yasic.library.particletextview.View.ParticleTextView;

public class MainActivity extends AppCompatActivity {

ParticleTextView particleTextView;
private String[] colors = {"#cccccc","#FFFFFF"};

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

particleTextView = (ParticleTextView)findViewById(R.id.particletextview);
ParticleTextViewConfig config = new ParticleTextViewConfig.Builder()
.setRowStep(6)
.setColumnStep(6)
.setTargetText("Kisaan Market")
.setReleasing(0.2)
.setParticleRadius(3)
.setMiniDistance(0.1)
.setTextSize(135)
.setParticleColorArray(colors)
.setMovingStrategy(new RandomMovingStrategy())
.instance();
particleTextView.setConfig(config);
particleTextView.startAnimation();

@Override
protected void onStart() {
super.onStart();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(MainActivity.this,SliderActivity.class);
startActivity(intent);
finish();
}
},10000);

}
}

SliderActivity.java
17
package com.example.android.kisaanmarket;

import android.content.Intent;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class SliderActivity extends AppCompatActivity {

ViewPager mSlideViewPager ;
LinearLayout mDotsLayout;
SliderAdapter sliderAdapter;
TextView[] mDots;
Button mButton;

Button mSignUp;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_slider);

mSignUp = (Button)findViewById(R.id.signup);
mSignUp.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new
Intent(SliderActivity.this,SignUpActivity.class));

}
});

mButton = (Button)findViewById(R.id.login);
mButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(SliderActivity.this,LoginActivity.class));

}
});

mSlideViewPager = (ViewPager)findViewById(R.id.slideViewPager);
mDotsLayout =(LinearLayout)findViewById(R.id.dotsLayout);
sliderAdapter = new SliderAdapter(this);
mSlideViewPager.setAdapter(sliderAdapter);
addDotsIndicator(0);
mSlideViewPager.addOnPageChangeListener(viewListener);

}
public void addDotsIndicator(int position)
{
mDots = new TextView[5];
mDotsLayout.removeAllViews();
for(int i=0;i<mDots.length;i++)

18
{
mDots[i] = new TextView(this);
mDots[i].setText(Html.fromHtml("&#8226;"));
mDots[i].setTextSize(35);

mDots[i].setTextColor(getResources().getColor(R.color.transparentwhite));
mDotsLayout.addView(mDots[i]);
}
if(mDots.length > 0)
{

mDots[position].setTextColor(getResources().getColor(R.color.lightgreen));
}
}

ViewPager.OnPageChangeListener viewListener = new


ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int
positionOffsetPixels) {

@Override
public void onPageSelected(int position) {
addDotsIndicator(position);

@Override
public void onPageScrollStateChanged(int state) {

}
};

Slider Adapter.java
package com.example.android.kisaanmarket;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

public class SliderAdapter extends PagerAdapter{

Context context;
LayoutInflater layoutInflater;

public SliderAdapter(Context context)


{
this.context=context;
}
//arrays

19
public int[] slide_images = {
R.drawable.veg,
R.drawable.fruit,
R.drawable.pulse,
R.drawable.cereals,
R.drawable.money
};

public String[] slide_names = {


"VEGETABLES",
"FRUITS",
"PULSES",
"CEREALS",
"BUSINESS"

};

public String[] slide_descs = {


"Buy organic vegetables free from pesticides , fertilizers , chemicals
etc. We guarantee the premium quality at cheapest price.",
"Buy organic fruits free from pesticides , fertilizers , chemicals etc.
We guarantee the premium quality at cheapest price.",
"Buy pulses free from polish , pesticides , fertilizers , chemicals
etc. We guarantee the premium quality at cheapest price.",
"Buy organic cereals free from polish , pesticides , fertilizers ,
chemicals etc. We guarantee the premium quality at cheapest price.",
"Grow your business , profits and happiness here... "
};

@Override
public int getCount() {
return slide_names.length;
}

@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
return view == (RelativeLayout)object;
}

@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
layoutInflater =
(LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View view =
layoutInflater.inflate(R.layout.activity_slider_adapter,container,false);
ImageView slideImageView = (ImageView) view.findViewById(R.id.imageView);
TextView slideTextView = (TextView) view.findViewById(R.id.textView3);
TextView slideTextDesc = (TextView) view.findViewById(R.id.textView4);

slideImageView.setImageResource(slide_images[position]);
slideTextView.setText(slide_names[position]);
slideTextDesc.setText(slide_descs[position]);
container.addView(view);
return view;
}

@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull
Object object) {
container.removeView((RelativeLayout)object);
}

SignUp Activity.java

20
package com.example.android.kisaanmarket;

import android.content.Intent;
import android.nfc.Tag;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.firebase.ui.auth.AuthUI;
import com.firebase.ui.auth.ErrorCodes;
import com.firebase.ui.auth.IdpResponse;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;

import java.util.Arrays;
import java.util.List;

import static java.sql.Types.NULL;

public class SignUpActivity extends AppCompatActivity {

private static final int RC_SIGN_IN = 123;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

FirebaseAuth auth = FirebaseAuth.getInstance();


if (auth.getCurrentUser() != null) {

else {
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setAvailableProviders(Arrays.asList(
new
AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
new
AuthUI.IdpConfig.Builder(AuthUI.PHONE_VERIFICATION_PROVIDER).build(),
new
AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()))
.setIsSmartLockEnabled(false)
.build(),
RC_SIGN_IN);

}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RC_SIGN_IN) {
IdpResponse response = IdpResponse.fromResultIntent(data);

if (resultCode == RESULT_OK) {
// Successfully signed in
startActivity(new Intent(SignUpActivity.this,HomeActivity.class));
finish();
//FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();

// ...
} else {
if (response == null) {

21
// User pressed back button
startActivity(new
Intent(SignUpActivity.this,SliderActivity.class));
Toast.makeText(SignUpActivity.this,"Sign up
cancelled",Toast.LENGTH_SHORT).show();
//finish();

}
}
}
public void signOut() {
AuthUI.getInstance()
.signOut(this)
.addOnCompleteListener(new OnCompleteListener<Void>() {
public void onComplete(@NonNull Task<Void> task) {
// ...
}
});

}
public void deleteAccount() {
AuthUI.getInstance()
.delete(this)
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
// ...
}
});
}

Login Activity.java
package com.example.android.kisaanmarket;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;

public class LoginActivity extends AppCompatActivity {

private TextView mTextView;


private EditText mEditText;
private EditText emailEditText;
private FirebaseDatabase database;
private Button mButton;

22
private TextView mSignUpText;

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

mTextView = (TextView)findViewById(R.id.textView8);
mEditText = (EditText)findViewById(R.id.editText2);
emailEditText = (EditText)findViewById(R.id.editText);
mButton = (Button)findViewById(R.id.login);
mSignUpText = (TextView)findViewById(R.id.textView);
mSignUpText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this,SignUpActivity.class));
}
});

database = FirebaseDatabase.getInstance();

mButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String email = EncodeString(emailEditText.getText().toString());

String password = mEditText.getText().toString();


DatabaseReference myRef = database.getReference("Users");

myRef.child(email).setValue(password);
}
});

mEditText.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PASSWORD);

mTextView.setVisibility(View.GONE);
mEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int
after) {
if(mEditText.getText().length() > 0)
{
mTextView.setVisibility(View.VISIBLE);
}
else
{
mTextView.setVisibility(View.GONE);
}
}

@Override
public void onTextChanged(CharSequence s, int start, int before, int
count) {

@Override
public void afterTextChanged(Editable s) {

}
});

mTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(mTextView.getText() == "SHOW")

23
{
mTextView.setText("HIDE");

mEditText.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
mEditText.setSelection(mEditText.length());
}
else
{
mTextView.setText("SHOW");
mEditText.setInputType(InputType.TYPE_CLASS_TEXT |
InputType.TYPE_TEXT_VARIATION_PASSWORD);
mEditText.setSelection(mEditText.length());

}
}
});

}
public static String EncodeString(String string) {
return string.replace(".", "dot");
}

@Override
public void onBackPressed() {
super.onBackPressed();
startActivity(new Intent(LoginActivity.this,SliderActivity.class));
}
}

HomeActivity.java
package com.example.android.kisaanmarket;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.Toast;

import com.mikepenz.materialdrawer.AccountHeader;
import com.mikepenz.materialdrawer.AccountHeaderBuilder;
import com.mikepenz.materialdrawer.Drawer;
import com.mikepenz.materialdrawer.DrawerBuilder;
import com.mikepenz.materialdrawer.model.DividerDrawerItem;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IProfile;

public class HomeActivity extends AppCompatActivity {

Toolbar mToolbar;
Drawer mDrawerResult;
AccountHeader mHeaderResult;
ProfileDrawerItem mProfileDrawerItem;
PrimaryDrawerItem mShare, mSettings, mProfile, mHome, mRate,
mFeedback,mSell,mBuy;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);

setupToolbar();
instantiateMenuItems();

24
setupProfileDrawer();
setupNavigationDrawerWithHeader();
}

private void setupToolbar()


{
mToolbar = (Toolbar) findViewById(R.id.toolbar);
mToolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
setSupportActionBar(mToolbar);

}
private void instantiateMenuItems(){
mProfile = new
PrimaryDrawerItem().withIdentifier(1).withName("Profile").withIcon(getResources().g
etDrawable(R.mipmap.ic_perm_identity_black_48dp));
mBuy = new
PrimaryDrawerItem().withIdentifier(2).withName("Buy").withIcon(getResources().getDr
awable(R.mipmap.ic_add_shopping_cart_black_48dp));
mSell = new
PrimaryDrawerItem().withIdentifier(3).withName("Sell").withIcon(getResources().getD
rawable(R.mipmap.ic_attach_money_black_48dp));
mHome = new
PrimaryDrawerItem().withIdentifier(4).withName("Home").withIcon(getResources().getD
rawable(R.mipmap.ic_home_black_24dp));
mSettings = new
PrimaryDrawerItem().withIdentifier(5).withName("Settings").withIcon(getResources().
getDrawable(R.mipmap.ic_settings_black_24dp));

mRate = new
PrimaryDrawerItem().withIdentifier(6).withName("Rate").withIcon(getResources().getD
rawable(R.mipmap.ic_star_black_48dp));;

mFeedback = new
PrimaryDrawerItem().withIdentifier(7).withName("Feedback").withIcon(getResources().
getDrawable(R.mipmap.ic_send_black_48dp));
mShare = new
PrimaryDrawerItem().withIdentifier(8).withName("Share").withIcon(getResources().get
Drawable(R.mipmap.ic_share_black_48dp));;
}

private void setupProfileDrawer() {


mProfileDrawerItem = new ProfileDrawerItem()

.withIcon(getResources().getDrawable(R.mipmap.ic_account_circle_black_24dp));
}

private AccountHeader setupAccountHeader(){


mHeaderResult = new AccountHeaderBuilder()
.withActivity(this)
.withHeaderBackground(R.drawable.header)
.addProfiles(mProfileDrawerItem)
.withOnAccountHeaderListener(new
AccountHeader.OnAccountHeaderListener() {
@Override
public boolean onProfileChanged(View view, IProfile profile,
boolean currentProfile) {
return false;
}
}).withSelectionListEnabledForSingleProfile(false)
.build();
return mHeaderResult;
}

private void setupNavigationDrawerWithHeader(){


mDrawerResult = new DrawerBuilder()
.withActivity(this)
.withAccountHeader(setupAccountHeader())
.withTranslucentStatusBar(true)

25
.withActionBarDrawerToggleAnimated(true)
.withSliderBackgroundColorRes (R.color.colorPrimaryDark)
.withToolbar(mToolbar)
.addDrawerItems(mProfile,mBuy,mSell , new
DividerDrawerItem(),mHome,mSettings,mRate,mFeedback,mShare)
.withOnDrawerItemClickListener(new
Drawer.OnDrawerItemClickListener() {
@Override
public boolean onItemClick(View view, int position, IDrawerItem
drawerItem) {
onNavDrawerItemSelected((int)drawerItem.getIdentifier());
return true;
}
})
.build();

mDrawerResult.deselect(mProfile.getIdentifier());

private void onNavDrawerItemSelected(int drawerItemIdentifier){


switch (drawerItemIdentifier){
case 1:
Toast.makeText(this, "Profile menu selected",
Toast.LENGTH_SHORT).show();
break;
case 2:
Toast.makeText(this, "Buy menu selected",
Toast.LENGTH_SHORT).show();
break;
case 3:
Toast.makeText(this, "Sell menu selected",
Toast.LENGTH_SHORT).show();
break;

case 4:
Toast.makeText(this, "Home menu selected",
Toast.LENGTH_SHORT).show();
break;
//Sign Out
case 5:
Toast.makeText(this, "Settings menu selected",
Toast.LENGTH_SHORT).show();
break;
//Home
case 6:
Toast.makeText(this, "Rate menu selected",
Toast.LENGTH_SHORT).show();
break;
//Settings
case 7:
Toast.makeText(this, "Feedback menu selected",
Toast.LENGTH_SHORT).show();
break;
case 8:
Toast.makeText(this, "Share menu selected",
Toast.LENGTH_SHORT).show();
break;
}
}

26
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.yasic.library.particletextview.View.ParticleTextView
android:id="@+id/particletextview"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</LinearLayout>

activity_slider.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v4.view.ViewPager
android:id="@+id/slideViewPager"
android:layout_width="match_parent"
android:layout_height="582dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true">

</android.support.v4.view.ViewPager>

<LinearLayout
android:id="@+id/dotsLayout"
android:layout_width="74dp"
android:layout_height="62dp"
android:layout_below="@+id/slideViewPager"
android:layout_centerHorizontal="true"
android:layout_marginTop="-47dp"
android:gravity="center_vertical|center_horizontal|center"
android:orientation="horizontal">

</LinearLayout>

<Button
android:id="@+id/signup"
android:layout_width="119dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_marginEnd="227dp"
android:layout_toStartOf="@id/login"
android:background="@android:color/transparent"
android:text="@string/sign_up"
android:textColor="@color/transparentwhite"
android:textSize="15sp" />

<Button

27
android:id="@+id/login"
android:layout_width="65dp"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:background="@android:color/transparent"
android:text="@string/log_in"
android:textColor="@color/transparentwhite"

android:textSize="15sp" />

</RelativeLayout>

activity_slider_adapter.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"
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:id="@+id/imageView"
android:layout_width="236dp"
android:layout_height="202dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="73dp"
android:contentDescription="@string/img"
android:scaleType="fitXY"
app:srcCompat="@drawable/veg" />

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/imageView"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:fontFamily="serif"
android:gravity="center_vertical|center_horizontal|center"
android:paddingEnd="20dp"
android:paddingStart="20dp"
android:text="@string/heading"
android:textColor="@color/transparentwhite"
android:textSize="32sp"
android:textStyle="bold" />

<TextView
android:id="@+id/textView4"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/textView3"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginTop="30dp"
android:fontFamily="cursive"
android:gravity="center_vertical|center_horizontal|center"
android:text="@string/description"
android:textColor="@color/white"
android:textSize="21sp"

28
android:textStyle="normal" />
</RelativeLayout>

activity_login.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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:paddingTop="20dp"
tools:context=".LoginActivity">

<TextView
android:id="@+id/textView2"
android:layout_width="349dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:fontFamily="serif"
android:gravity="center_vertical|center_horizontal"
android:text="@string/login_to_your_kisaan_market_account"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="normal|italic"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.056" />

<EditText
android:id="@+id/editText"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/input_bck"
android:ems="10"
android:fontFamily="monospace"
android:hint="@string/email_address"
android:inputType="textEmailAddress"
android:padding="10dp"
android:textColorHint="@color/lightBlack"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.492"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:layout_constraintVertical_bias="0.089" />

<EditText
android:id="@+id/editText2"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"

29
android:layout_marginTop="8dp"
android:background="@drawable/input_bck"
android:ems="10"
android:fontFamily="monospace"
android:hint="@string/password"
android:inputType="textPassword"
android:maxLines="1"
android:padding="10dp"
android:textColorHint="@color/lightBlack"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editText"
app:layout_constraintVertical_bias="0.059" />

<Button
android:id="@+id/login"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:background="@drawable/ripple"
android:fontFamily="monospace"
android:text="@string/log_in"
android:textColor="@color/colorPrimaryDark"

android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.495"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editText2"
app:layout_constraintVertical_bias="0.222" />

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_marginBottom="40dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:fontFamily="monospace"
android:text="@string/forgot_password"
android:textColor="@color/white"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@+id/login"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.89"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editText2"
app:layout_constraintVertical_bias="0.0" />

<TextView
android:id="@+id/textView8"
android:layout_width="47dp"
android:layout_height="23dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:gravity="center_vertical|center_horizontal|center"
android:text="@string/show"
android:textColor="@color/lightBlack"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/editText2"
app:layout_constraintEnd_toEndOf="@+id/editText2"
app:layout_constraintHorizontal_bias="1.0"

30
app:layout_constraintStart_toStartOf="@+id/editText2"
app:layout_constraintTop_toTopOf="@+id/editText2" />

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:layout_marginBottom="196dp"
android:fontFamily="monospace"
android:gravity="center_vertical|center_horizontal"
android:text="@string/or_signup_now"
android:textColor="@color/white"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</android.support.constraint.ConstraintLayout>

activity_home.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
tools:context=".HomeActivity">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:background="@color/colorPrimary"
>

</android.support.v7.widget.Toolbar>

<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome"
android:textColor="@color/lightBlack"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>

Strings.xml
31
<resources>
<string name="app_name">KisaanMarket</string>
<string name="log_in">LOG IN</string>
<string name="sign_up">SIGN UP</string>
<string name="heading">HEADING</string>
<string name="img">img</string>
<string name="description">The satisfaction that accompanies the success in
completion of task would be incomplete without mentioning the people who made it
possible, whose constant guidance and encouragement crowned my effort with
success.</string>
<string name="login_to_your_kisaan_market_account">Login to your Kisaan Market
Account</string>

<string name="forgot_password">Forgot password?</string>


<string name="sign_in">SIGN IN</string>
<string name="show">SHOW</string>
<string name="welcome">Welcome</string>
<string name="or_signup_now">Or Signup Now</string>
<string name="email_address">Email Address ....</string>
<string name="password">Password ...</string>

</resources>

Styles.xml
<resources>

<!-- Base application theme. -->


<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@drawable/background1</item>
</style>

<style name="LoginTheme" parent="Theme.AppCompat.Light.NoActionBar">


<item name="colorPrimary">@color/colorPrimaryDark</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/white</item>
<item name="android:windowBackground">@drawable/background1</item>

</style>

<style name="HomeTheme" parent="Theme.AppCompat.Light.NoActionBar">


<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/white</item>
<item name="android:windowBackground">@color/white</item>

</style>

</resources>

32
Colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#0288D1</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#2196F3</color>
<color name="transparentwhite">#cccccc</color>
<color name="white">#FFFFFF</color>
<color name="lightgreen">#009688</color>
<color name="lightBlack">#777777</color>

</resources>

Under Drawable folder(Resources)

ripple.xml
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:color="@color/lightBlack"
tools:targetApi="lollipop">
<item>

<selector >
<item android:state_pressed="true">
<shape android:shape="rectangle">
<corners android:radius="8dip"/>
<stroke android:width="4dip" android:color="@color/white"/>
<gradient android:angle="-90" android:startColor="@color/white"
android:endColor="@color/white"/>
</shape>
</item>

<item android:state_focused= "true">


<shape android:shape="rectangle">
<corners android:radius="8dip"/>
<stroke android:width="4dip" android:color="@color/white"/>
<solid android:color="@color/white"/>
</shape>
</item>

<item>
<shape android:shape="rectangle">
<corners android:radius="8dip"/>
<stroke android:width="4dip" android:color="@color/white"/>
<gradient android:angle="90" android:startColor="@color/white"
android:endColor="@color/white"/>
</shape>
</item>
</selector>
</item>
</ripple>

33
Input_bck.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<corners android:radius="3dip"/>
</shape>

11.About Our Team

12. Conclusion

This application save our time because we can easily find information about
different types of grains and it’s price and any one can easily use this
application as a E-Commerce application.
This application also provide the facility that any person can easily search the
product quality, quantity and new updates about the grain product. If any person
is not satisfy with our facility then through this application they can also
communicate with the seller and give their feedback and take response.
If user want to see the price variation of grain month wise so this application
will also help them.

34

Вам также может понравиться