Commit 557d4850 authored by P.Y.D Jayasinghe's avatar P.Y.D Jayasinghe

Master added

parents 33c4f0c8 15680fad
# Default ignored files
/shelf/
/workspace.xml
E ketha
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
# 2022-81 # 2022-81
## Main objective:
The main objective of this research project is to help farmers with their paddy
fields and make life easier for them. The farmers will be receiving proper guidance
and techniques so that producing a steady abundant yield of crops to match the great
demand of consumers. Farmers will have the opportunity of exchanging information
among one-another so as to regulate knowledge.
## Main Research questions
There were four major concerns we were able to recognise after conversing with the
proper authorities and farmers alike. In no particular order of importance, they are
diseases and pests harming the rice crops, unwanted weeds that are growing in paddy fields,
mismanagement of fertilisers by farmers and finally growth issues when it comes to different rice
life cycles.
## Individual research question
**IT19101620** - The first major issue when it comes to paddy is the prevalence of diseases that
are native to rice. With new diseases and sicknesses being found each passing day,
it becomes difficult for the common farmer to identify and treat them. What is closely
related to diseases are pests and other unwanted insects that are also attracted to the crops.
These pests might be the reason that diseases are created from the plant in the first place,
as well as the reason why diseases are distributed. Pests, even while not spreading disease,
might make the crops unsanitary for human consumption.
**IT19117256** - The second issue is the growth of unwanted weeds that are prevalent in paddy fields.
While weeds do not directly harm rice crops, weeds absorb nutrients from the paddy fields
that should have gone for the development of healthy rice plants. The identification of weeds
however is not difficult for the common farmer, but the true challenge lies in the recognition
of proper weedicide to combat the identified weed. This is due to vast amount of weed types and
the equally wide variety of weedicides being difficult to recollect for the common famer.
**IT19129372** - The next issue is the recognition of suitable fertilizers that are needed for the crops
to grow healthy and abundant. Farmers due to lack proper guidance tent to use incorrect fertilizers,
fertilizers that have considerable side effects or even the correct fertilizers in wrong amounts thus
making it harmful. This has become a major problem in Sri Lanka today due there being reports of various
health concerns for the consumer such as increasing the risk of Alzheimer’s disease and Diabetes.
The environment is also damaged as a repercussion, examples being contaminated waterways and the
destruction of algae.
**IT19240152** - Finally, there have been concerns about the fact that, farmers are lacking in knowledge when
it comes to the lifecycle of rice crops and whether the rice plant is in the proper phase of the
lifecycle at the given time. This can cause mistreatment or no treatment altogether thus resulting
poor harvest and there by profit.
## Individual Objectives
**IT19101620** - Introduction of a mobile application to identify diseases and pests in paddy cultivation.
The main objective of identifying potential diseases and pests in paddy plants is to create
an Android based mobile application that can analyze leaf changes using the image processing
method and detect possible diseases in paddy cultivation. This Android based mobile application
is used to detect leaf diseases with the help of automated algorithms and those pests can detect
automated algorithms. This uses the database to identify the most vulnerable sheets and present
the most accurate result. In addition, the application provides treatment for diseases and pests.
**IT19117256** - The main objective of this component is to identify weeds that are commonly spread in rice fields.
This is done using a mobile based application and images that are inputted to it. First part is to
highlight the areas of the paddy field that are rich in weed through the use of aerial imagery fed to
the application. Then image processing technology is used to compare and contrast the weed rich areas
and show to the app user. Then the user has the ability to take an image of the weeds up close to identify
their types also with the help of image processing. Finally the application will use machine learning and
deep learning to show the best solution to combat the particular weed type.
**IT19129372** - Introduce a mobile application to Identify the fertilization information. Then give guidance to the
farmer on how to use it properly according to fertilizer type.
The main objective of the application is to give proper guidance to the farmer on how to use
fertilizers. In order to do that user will have the ability to take a picture of rice fields and fertilizers.
This will help to identify the best utilization methods with detailed instructions including amount and dosage
of fertilization that could be used to aid their growth using the machine learning. Then the farmer can easily
conduct the fertilization according to the instructions given by the application.
**IT19240152** - The main objective of identifying the growth of paddy plants is to create an Android-based mobile application
that analyzes the changes in the paddy tree using image processing technology and tracks the height of the paddy tree.
The Mobile-based application is used to identify the height of a paddy tree with the help of an automated algorithm.
The algorithm uses the database to identify the most vulnerable and predict the most accurate outcome. In addition,
the application provides treatment to a paddy grower to increase the growth of paddy cultivation.
/build /build
\ No newline at end of file /src/main/assets
\ No newline at end of file
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id 'com.chaquo.python'
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.eketha"
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi-v7a", "x86"
}
python {
buildPython "C:/python/python.exe"
pip {
install "opencv-contrib-python-headless"
install "pillow"
install "numpy"
install "fastapi"
install "matplotlib"
install "dlib"
install "imutils"
install "argparse"
install "scipy"
}
}
sourceSets {
main {
python.srcDir "src/main/python"
}
}
}
lintOptions {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
aaptOptions {
noCompress "tflite"
//noCompress "lite"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'com.google.firebase:firebase-firestore:23.0.3'
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'org.tensorflow:tensorflow-lite-support:0.1.0'
implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation('org.tensorflow:tensorflow-lite:0.0.0-nightly') { changing = true }
implementation('org.tensorflow:tensorflow-lite-gpu:0.0.0-nightly') { changing = true }
implementation('org.tensorflow:tensorflow-lite-support:0.0.0-nightly') { changing = true }
//Tensorflow Lite Dependencies
implementation 'org.tensorflow:tensorflow-lite:+'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
\ No newline at end of file
{
"project_info": {
"project_number": "298794319825",
"project_id": "e-ketha-1d78c",
"storage_bucket": "e-ketha-1d78c.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:298794319825:android:655562d35cdefc6beb2af0",
"android_client_info": {
"package_name": "com.example.eketha"
}
},
"oauth_client": [
{
"client_id": "298794319825-ggpi5ip7rblgnrtjd45agcgpta9vosfu.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDUT3ASDvnYO9wWONGaXq8VceXfKTgYYGY"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "298794319825-ggpi5ip7rblgnrtjd45agcgpta9vosfu.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
\ No newline at end of file
package com.example.eketha;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.eketha", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.eketha">
<uses-feature
android:name="android.hardware.Camera.any"
android:required="true" />
<uses-feature
android:name="android.hardware.Camera"
android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.EKetha">
<activity android:name=".SplashScreen"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".GrowthHeight" />
<activity android:name=".GrowthThreatment" />
<activity android:name=".GrowthDetect" />
<activity android:name=".Admin" />
<activity android:name=".growthHome" />
<activity android:name=".Growth" />
<activity android:name=".Register" />
<activity android:name=".Login"/>
<activity android:name=".MainActivity" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Admin extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin);
}
}
\ No newline at end of file
This diff is collapsed.
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import org.tensorflow.lite.support.common.TensorProcessor;
import org.tensorflow.lite.support.tensorbuffer.TensorBuffer;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.List;
public class GrowthDetect extends AppCompatActivity {
private TensorBuffer outputProbabilityBuffer;
private TensorProcessor probabilityProcessor;
private Bitmap bitmap,inputImage,outputImage,outputImage1;
private List<String> labels;
private TextView resulttext,resulttext2;
private Button btnTreatment, btn;
private ImageView imageView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_detect);
imageView1 = findViewById(R.id.image2);
btnTreatment = findViewById(R.id.btnTreatment);
resulttext = findViewById(R.id.resulttext);
resulttext2 = findViewById(R.id.resulttext2);
String result = getIntent().getStringExtra("results");
resulttext.setText(result);
String det = getIntent().getStringExtra("details");
resulttext2.setText(det);
String button = getIntent().getStringExtra("button");
btnTreatment.setText(button);
String filename = getIntent().getStringExtra("image");
try {
FileInputStream is = this.openFileInput(filename);
inputImage = BitmapFactory.decodeStream(is);
imageView1.setImageBitmap(inputImage);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
if(button.equals("Height Measurement")){
btnTreatment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String result2 = resulttext.getText().toString();
String treatment = "";
if(result2.equals("Rice")){
treatment="Rice";
System.out.println(result2);
} else if(result2.equals("Weed")){
treatment=getResources().getString(R.string.treatment1);
System.out.println(result2);
}
BitmapDrawable drawable = (BitmapDrawable) imageView1.getDrawable();
outputImage = drawable.getBitmap();
try {
//Write file
String filename = "bitmap.png";
FileOutputStream stream = openFileOutput(filename, Context.MODE_PRIVATE);
outputImage.compress(Bitmap.CompressFormat.PNG, 100, stream);
//Cleanup
stream.close();
outputImage.recycle();
Intent intent2 = new Intent(GrowthDetect.this, GrowthHeight.class);
intent2.putExtra("results2", result2);
intent2.putExtra("image", filename);
startActivity(intent2);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}else if(button.equals("Weed Identification")) {
{
btnTreatment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Intent intent2 = new Intent(GrowthDetect.this, Weeds.class);
// startActivity(intent2);
}
});
}
}
}
}
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.util.Base64;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import com.chaquo.python.PyObject;
import com.chaquo.python.Python;
import com.chaquo.python.android.AndroidPlatform;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class GrowthHeight extends AppCompatActivity {
private Handler handler = null;
private Bitmap inputImage,newImage,bitmap,outputImage,outputImage1;
private Button btnHeight,btnThreatment;
private ImageView imageView1;
private BitmapDrawable drawable;
private String imageString;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_height);
imageView1 = findViewById(R.id.imageHeightView);
btnHeight = findViewById(R.id.button3);
btnThreatment = findViewById(R.id.button2);
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(this));
}
String filename = getIntent().getStringExtra("image");
try {
FileInputStream is = this.openFileInput(filename);
inputImage = BitmapFactory.decodeStream(is);
imageView1.setImageBitmap(inputImage);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
btnThreatment.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BitmapDrawable drawable = (BitmapDrawable) imageView1.getDrawable();
outputImage1 = drawable.getBitmap();
try {
//Write file
String filename = "bitmap.png";
FileOutputStream stream = openFileOutput(filename, Context.MODE_PRIVATE);
outputImage1.compress(Bitmap.CompressFormat.PNG, 100, stream);
//Cleanup
stream.close();
outputImage1.recycle();
//Pop intent
Intent intent = new Intent(GrowthHeight.this, GrowthThreatment.class);
intent.putExtra("image", filename);
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
}
});
btnHeight.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
autoDenoiseImage();
}
});
}
private void autoDenoiseImage() {
new Thread() {
public void run() {
startMeasuring();
newImage = outputImage;
handler.sendEmptyMessage(0);
}
}.start();
handler = new Handler() {
public void handleMessage(android.os.Message msg) {
imageView1.setImageBitmap(outputImage);
}
;
};
}
public void heightImage(View v) {
autoDenoiseImage();
imageView1.setImageBitmap(newImage);
}
private String getStringImage(Bitmap bitmap) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
byte[] imageBytes = byteArrayOutputStream.toByteArray();
String encodedImage = Base64.encodeToString(imageBytes, Base64.DEFAULT);
return encodedImage;
}
public void startMeasuring() {
final Python py= Python.getInstance();
imageString = getStringImage(inputImage);
PyObject pyo = py.getModule("height");
PyObject obj = pyo.callAttr("main", imageString);
String str = obj.toString();
byte data[] = Base64.decode(str, Base64.DEFAULT);
Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length);
outputImage = bmp;
}
}
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.ImageView;
import java.io.FileInputStream;
public class GrowthThreatment extends AppCompatActivity {
private Bitmap inputImage;
private ImageView imageView1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_threatment);
imageView1 = findViewById(R.id.treatImg);
String filename = getIntent().getStringExtra("image");
try {
FileInputStream is = this.openFileInput(filename);
inputImage = BitmapFactory.decodeStream(is);
imageView1.setImageBitmap(inputImage);
is.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
\ No newline at end of file
package com.example.eketha;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.InputType;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;
public class Login extends AppCompatActivity {
EditText Email, password;
Button login;
boolean valid;
FirebaseAuth fAuth;
FirebaseFirestore fStore;
TextView text2;
CheckBox remember;
SharedPreferences sharedPreferences;
SharedPreferences.Editor editor;
Boolean saveLogin;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
Email = findViewById(R.id.loginemail);
password = findViewById(R.id.loginpassword);
login = findViewById(R.id.btnlogin);
text2 = findViewById(R.id.txtdonthaveacc);
fAuth = FirebaseAuth.getInstance();
fStore = FirebaseFirestore.getInstance();
remember=findViewById(R.id.rememmber_me);
password.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
//remember me---------------------------------------------------------------------------------------------------------------------------
sharedPreferences=getSharedPreferences("PRESS_NAME",MODE_PRIVATE);
editor=sharedPreferences.edit();
saveLogin=sharedPreferences.getBoolean("SaveLogin",true);
if (saveLogin = true) {
Email.setText(sharedPreferences.getString("Email", null));
password.setText(sharedPreferences.getString("password", null));
}
//click the signUp button----------------------------------------------------------------------------------------------------------
text2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getApplicationContext(), Register.class));
}
});
//-----------------------------------------------------------------------------------------------------------------------------------
//Click the login button------------------------------------------------------------------------------------------------------------
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
checkField(Email);
checkField(password);
if (valid) {
fAuth.signInWithEmailAndPassword(Email.getText().toString(), password.getText().toString()).addOnSuccessListener(new OnSuccessListener<AuthResult>() {
@Override
public void onSuccess(AuthResult authResult) {
Toast.makeText(Login.this, "Logging Successfully", Toast.LENGTH_SHORT).show();
checkUserAccessLevel(authResult.getUser().getUid());
//check the remember me checked------------------------------------------------------------------------------------------
if(remember.isChecked()){
editor.putBoolean("SaveLogin",true);
editor.putString("Email",Email.getText().toString());
editor.putString("password",password.getText().toString());
editor.commit();
Toast.makeText(Login.this, "Save Email and password", Toast.LENGTH_SHORT).show();
}else {
//Toast.makeText(Login.this, "Remember Not Save Email and password", Toast.LENGTH_SHORT).show();
}
//---------------------------------------------------------------------------------------------------------------------
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Login.this, "Logging Failed", Toast.LENGTH_SHORT).show();
}
});
}
}
});
//------------------------------------------------------------------------------------------------------------------------------------------
}//end the main-------------------------------------------------------------------------------------------------------------------------------
//Define the user roles user and admin-------------------------------------------------------------------------------------------------------
private void checkUserAccessLevel(String uid) {
DocumentReference df = fStore.collection("Users").document(uid);
//extract data from the users
df.get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
@Override
public void onSuccess(DocumentSnapshot documentSnapshot) {
Log.d("TAG", "onSuccess" + documentSnapshot.getData());
//identity user access level
if (documentSnapshot.getString("isAdmin") != null) {
//user admin
startActivity(new Intent(getApplicationContext(), Admin.class));
finish();
}
if (documentSnapshot.getString("isUser") != null) {
//user users
Intent i = new Intent(getApplicationContext(), MainActivity.class);
startActivity(i);
finish();
}
}
});
}//end user role-----
//check the validation------------------------------------------------------------------------------------------------------------------------
public boolean checkField(EditText textFiled) {
if (textFiled == Email) {
String val = Email.getText().toString();
String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
if (val.isEmpty()) {
Email.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(emailPattern)) {
Email.setError("Invalid email address");
valid = false;
} else {
Email.setError(null);
valid = true;
}
return valid;
}
else if(textFiled==password){
String val=password.getText().toString();
if (val.isEmpty()) {
password.setError("Field cannot be empty");
valid= false;
} else if (val.length()<6) {
password.setError("At least 6 characters");
valid= false;
}else {
password.setError(null);
valid= true;
}
return valid;
}
return valid;
}
@Override
protected void onStart() {
super.onStart();
if (FirebaseAuth.getInstance().getCurrentUser() != null) {
startActivity(new Intent(getApplicationContext(), MainActivity.class));
finish();
}
}//end validation
}
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import com.google.firebase.auth.FirebaseAuth;
public class MainActivity extends AppCompatActivity {
private CardView cardView1, cardView2, cardView3, cardView4;
private ImageButton logout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
cardView1 = findViewById(R.id.card1);
cardView2 = findViewById(R.id.card2);
cardView3 = findViewById(R.id.card3);
cardView4 = findViewById(R.id.card4);
logout = findViewById(R.id.btnalogout);
logout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FirebaseAuth.getInstance().signOut();
startActivity(new Intent(getApplicationContext(), Login.class));
finish();
}
});
// cardView1.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),pdHome.class);
// startActivity(intent);
// }
// });
//
// cardView2.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),weedHome.class);
// startActivity(intent);
// }
// });
//
// cardView3.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),fertilizerHome.class);
// startActivity(intent);
// }
// });
cardView4.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),growthHome.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.eketha;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class NetworkClient {
private static Retrofit retrofit;
private static String BASE_URL = "www.abc.com/";
public static Retrofit getRetrofit() {
OkHttpClient okHttpClient = new OkHttpClient.Builder().build();
if (retrofit == null) {
retrofit = new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(okHttpClient).build();
}
return retrofit;
}
}
package com.example.eketha;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.FirebaseFirestore;
import java.util.HashMap;
import java.util.Map;
public class Register extends AppCompatActivity {
EditText fullName, password, retypePassword, Email, mobile;
Button createAccount;
boolean valid = true;
TextView text;
FirebaseAuth fAuth;
FirebaseFirestore fStory;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
fAuth = FirebaseAuth.getInstance();
fStory = FirebaseFirestore.getInstance();
fullName = findViewById(R.id.registerfullName);
Email = findViewById(R.id.registeremail);
mobile = findViewById(R.id.registermobile);
password = findViewById(R.id.registerpassword);
retypePassword = findViewById(R.id.registerretypepassowrd);
createAccount = findViewById(R.id.btnregcreateaccount);
text = findViewById(R.id.txtsigiin);
createAccount.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//Validation check-----------------------------------------------------------------------------------------------------------------------
checkField(fullName);
checkField(Email);
checkField(mobile);
checkField(password);
checkField(retypePassword);
//database input--------------------------------------------------------------------------------------------------------------------------
if (valid) {
fAuth.createUserWithEmailAndPassword(Email.getText().toString(), password.getText().toString()).addOnSuccessListener(new OnSuccessListener<AuthResult>() {
@Override
public void onSuccess(AuthResult authResult) {
FirebaseUser user = fAuth.getCurrentUser();
Toast.makeText(Register.this, "Account Created", Toast.LENGTH_SHORT).show();
DocumentReference df = fStory.collection("Users").document(user.getUid());
Map<String, Object> userInfo = new HashMap<>();
userInfo.put("FullName", fullName.getText().toString());
userInfo.put("Email", Email.getText().toString());
userInfo.put("Mobile", mobile.getText().toString());
userInfo.put("Password", password.getText().toString());
//specify if the user is admin//
userInfo.put("isUser", "1");
df.set(userInfo);
FirebaseAuth.getInstance().signOut();
//startActivity(new Intent(getApplicationContext(), MainActivity.class));
finish();
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Toast.makeText(Register.this, "Failed to Create Account", Toast.LENGTH_LONG).show();
}
});
}
}
});
text.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(getApplicationContext(), Login.class));
}
});
}
//-----------------------------------------------validation-------------------------------------------------------------------------
public boolean checkField(EditText textFiled) {
if (textFiled == fullName) {
String val = fullName.getText().toString();
if (val.isEmpty()) {
fullName.setError("Field cannot be empty");
valid = false;
} else {
fullName.setError(null);
valid = true;
}
return valid;
} else if (textFiled == Email) {
String val = Email.getText().toString();
String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+";
if (val.isEmpty()) {
Email.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(emailPattern)) {
Email.setError("Invalid email address");
valid = false;
} else {
Email.setError(null);
valid = true;
}
return valid;
} else if (textFiled == mobile) {
String val = mobile.getText().toString();
String MobilePattern = "[0-9]{10}";
if (val.isEmpty()) {
mobile.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(MobilePattern)) {
mobile.setError("Invalid 10 digit mobile no ");
valid = false;
} else if (val.length()<10) {
mobile.setError("Invalid 10 digit no");
valid = false;
} else {
mobile.setError(null);
valid = true;
}
return valid;
} else if (textFiled == password) {
String val = password.getText().toString();
String passwordVal = "^" +
//"(?=.*[0-9])" + //at least 1 digit
//"(?=.*[a-z])" + //at least 1 lower case letter
//"(?=.*[A-Z])" + //at least 1 upper case letter
"(?=.*[a-zA-Z])" + //any letter
"(?=.*[@#$%^&+=])" + //at least 1 special character
"(?=\\S+$)" + //no white spaces
".{4,}" + //at least 4 characters
"$";
if (val.isEmpty()) {
password.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(passwordVal)) {
password.setError("Password is too weak");
valid = false;
} else if (val.length() < 6) {
password.setError("At least 6 characters");
valid = false;
} else {
password.setError(null);
valid = true;
}
return valid;
} else if (textFiled == retypePassword) {
String val = retypePassword.getText().toString();
String val2 = password.getText().toString();
String passwordVal = "^" +
//"(?=.*[0-9])" + //at least 1 digit
//"(?=.*[a-z])" + //at least 1 lower case letter
//"(?=.*[A-Z])" + //at least 1 upper case letter
"(?=.*[a-zA-Z])" + //any letter
"(?=.*[@#$%^&+=])" + //at least 1 special character
"(?=\\S+$)" + //no white spaces
".{4,}" + //at least 4 characters
"$";
if (val.isEmpty()) {
retypePassword.setError("Field cannot be empty");
valid = false;
} else if (!val.matches(passwordVal)) {
retypePassword.setError("Password is too weak");
valid = false;
} else if (val.charAt(0)=='0') {
retypePassword.setError("At first 0 characters");
valid = false;
} else if (!val2.equals(val)) {
retypePassword.setError("Does to match the password");
valid = false;
} else {
retypePassword.setError(null);
valid = true;
}
return valid;
}
return valid;
}
}
\ No newline at end of file
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.firebase.auth.FirebaseAuth;
public class SplashScreen extends AppCompatActivity {
private static int SPLASH_TIME = 3000;
private ImageView image;
private TextView hi,welcome;
private Animation topanim,bottomanim;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
image = findViewById(R.id.imageView);
hi = findViewById(R.id.txthi);
welcome = findViewById(R.id.txtwelcm);
//Animations
topanim = AnimationUtils.loadAnimation(this, R.anim.top_animation);
bottomanim = AnimationUtils.loadAnimation(this, R.anim.botton_animation);
image.setAnimation(topanim);
hi.setAnimation(bottomanim);
welcome.setAnimation(bottomanim);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
FirebaseAuth.getInstance().signOut();
Intent n = new Intent(SplashScreen.this, Login.class);
startActivity(n);
finish();
}
},SPLASH_TIME);
}
}
\ No newline at end of file
package com.example.eketha;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface UploadApis {
@Multipart
@POST("upload")
Call<RequestBody> uploadImage(@Part MultipartBody.Part part, @Part("somedata") RequestBody requestBody);
}
package com.example.eketha;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
public class growthHome extends AppCompatActivity {
private LinearLayout layer1, layer2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_growth_home);
layer1 = findViewById(R.id.layer2);
//layer2 = findViewById(R.id.layer3);
layer1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),Growth.class);
startActivity(intent);
}
});
// layer2.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),Fertilizer.class);
// startActivity(intent);
// }
// });
}
}
\ No newline at end of file
from scipy.spatial.distance import euclidean
from imutils import perspective
from imutils import contours
import argparse
import numpy as np
import imutils
import cv2
import base64
import io
from PIL import Image
import os
def show_images(images):
for i, img in enumerate(images):
cv2.imshow("image_" + str(i), img)
def main(data):
#decode the image
decoded_data = base64.b64decode(data)
np_data = np.fromstring(decoded_data, np.uint8)
in_img = cv2.imdecode(np_data, cv2.IMREAD_UNCHANGED)
out_img = in_img.copy()
if len(out_img.shape) < 3:
out_img.resize(*out_img.shape,1)
gray = cv2.cvtColor(out_img, cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(gray, (9, 9), 0)
edged = cv2.Canny(blur, 50, 100)
edged = cv2.dilate(edged, None, iterations=1)
edged = cv2.erode(edged, None, iterations=1)
cnts = cv2.findContours(edged.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
(cnts, _) = contours.sort_contours(cnts)
cnts = [x for x in cnts if cv2.contourArea(x) >2000]
ref_object = cnts[0]
box = cv2.minAreaRect(ref_object)
box = cv2.boxPoints(box)
box = np.array(box, dtype="int")
box = perspective.order_points(box)
(tl, tr, br, bl) = box
dist_in_pixel = euclidean(tl, tr)
dist_in_cm =10
pixel_per_cm = dist_in_pixel/dist_in_cm
for cnt in cnts:
box = cv2.minAreaRect(cnt)
box = cv2.boxPoints(box)
box = np.array(box, dtype="int")
box = perspective.order_points(box)
(tl, tr, br, bl) = box
cv2.drawContours(out_img, [box.astype("int")], -1, (0, 0, 255), 2)
mid_pt_horizontal = (tl[0] + int(abs(tr[0] - tl[0])/2), tl[1] + int(abs(tr[1] - tl[1])/2))
mid_pt_verticle = (tr[0] + int(abs(tr[0] - br[0])/2), tr[1] + int(abs(tr[1] - br[1])/2))
wid = euclidean(tl, tr)/pixel_per_cm
ht = euclidean(tr, br)/pixel_per_cm
cv2.putText(out_img, "{:.1f}cm".format(ht), (int(mid_pt_verticle[0] + 10), int(mid_pt_verticle[1])),
cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 5), 2)
pil_img = Image.fromarray(out_img)
buff = io.BytesIO()
pil_img.save(buff, format="JPEG")
#encode the image
img_str = base64.b64encode(buff.getvalue())
return ""+str(img_str, 'utf-8')
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="1500"
android:fromXDelta="0%"
android:fromYDelta="100%" />
<alpha
android:duration="1500"
android:fromAlpha="0.1"
android:toAlpha="1.0" />
</set>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="2000"
android:fromXDelta="0%"
android:fromYDelta="-50%" />
<alpha
android:duration="1500"
android:fromAlpha="0.1"
android:toAlpha="1.0" />
</set>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/limegreen"/>
<corners android:radius="10dp"/>
</shape>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="700"
android:viewportHeight="700">
<path
android:fillColor="#FF000000"
android:pathData="m416.64,383.04c-6.719,0.559 -12.879,-2.801 -19.039,-6.16 -56.562,-33.039 -104.72,-80.078 -138.32,-136.08 -6.16,-9.519 -11.762,-20.719 -9.519,-31.922 3.922,-21.281 30.801,-29.68 38.641,-49.84 7.281,-17.359 -2.238,-36.961 -13.441,-52.078 -18.48,-25.199 -42,-47.039 -68.879,-63.281 -12.883,-7.84 -26.883,-14.559 -42.004,-15.68 -67.758,-3.359 -71.68,109.76 -62.719,154 9.519,45.922 32.48,88.48 59.359,127.12 63.281,91.84 150.08,169.68 255.36,206.64 36.961,12.879 76.719,20.719 114.8,11.762 19.039,-4.481 36.961,-12.879 50.398,-27.441 13.441,-14 20.719,-34.16 17.359,-53.199 -3.359,-19.602 -16.801,-35.281 -30.238,-49.281 -19.602,-20.16 -41.441,-38.078 -64.961,-53.762 -4.481,-2.801 -8.961,-5.602 -14,-6.16 -5.602,-0.559 -10.641,2.238 -15.68,5.039 -14,7.84 -26.879,17.359 -38.078,28 -5.039,5.039 -10.641,10.078 -17.359,11.199 -0.559,0.563 -1.121,1.121 -1.68,1.121z"/>
</vector>
<vector android:height="24dp" android:tint="@color/black"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector android:height="24dp" android:tint="@color/black"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z"/>
</vector>
<vector android:height="40dp" android:viewportHeight="700"
android:viewportWidth="700" android:width="40dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="m254.27,170.59c0,-25.391 10.086,-49.742 28.039,-67.695 17.953,-17.953 42.305,-28.043 67.695,-28.043s49.742,10.09 67.695,28.043c17.953,17.953 28.039,42.305 28.039,67.695s-10.086,49.738 -28.039,67.695c-17.953,17.953 -42.305,28.039 -67.695,28.039 -25.383,-0.027 -49.715,-10.125 -67.664,-28.07 -17.949,-17.949 -28.043,-42.285 -28.07,-67.664zM377.36,293.68h-54.703c-32.637,0.039 -63.922,13.02 -86.996,36.094 -23.074,23.074 -36.055,54.363 -36.094,86.996 0.023,18.129 7.234,35.508 20.051,48.328 12.82,12.82 30.203,20.031 48.332,20.055h164.12c18.129,-0.023 35.512,-7.234 48.332,-20.055 12.816,-12.82 20.027,-30.199 20.051,-48.328 -0.039,-32.633 -13.02,-63.922 -36.094,-86.996 -23.074,-23.074 -54.359,-36.055 -86.996,-36.094z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/lime"/>
<corners android:radius="100dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="@color/green"
android:width="1dp"/>
<corners android:radius="100dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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=".Admin">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
tools:context=".Growth">
<TextView
android:id="@+id/text"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="IDENTIFICATION OF RICE RELATED PlANTS"
android:textAlignment="center"
android:textColor="#009688"
android:textSize="20dp" />
<ImageView
android:id="@+id/image"
android:layout_width="370sp"
android:layout_height="370sp"
android:layout_centerHorizontal="true"
android:layout_marginTop="10sp" />
<Button
android:id="@+id/btnTakePic"
android:layout_marginTop="200dp"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_above="@id/button2"
android:layout_margin="10dp"
android:text="Open Camera"
android:textColor="#EDE8E8"
android:textSize="18sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnOpenCam"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_margin="10dp"
android:text="Launch Gallery"
android:textAllCaps="false"
android:textColor="#EDE8E8"
android:textSize="18sp"
android:textStyle="bold" />
<Button
android:id="@+id/btnConfirm"
android:layout_width="wrap_content"
android:layout_height="68dp"
android:layout_margin="10dp"
android:allowClickWhenDisabled="true"
android:text="Rice Identification"
android:textColor="#EDE8E8"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/classitext"
android:layout_marginTop="2dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="20dp" />
<TextView
android:id="@+id/treattext"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Result"
android:textAlignment="center"
android:textColor="#D32F2F"
android:textSize="20dp" />
</LinearLayout>
\ No newline at end of file
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
tools:context=".GrowthDetect">
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="RICE PLANT RESULT"
android:textAlignment="center"
android:textColor="#009688"
android:textSize="30dp" />
<TextView
android:id="@+id/resulttext"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Result"
android:textAlignment="center"
android:textColor="#D32F2F"
android:textSize="30dp" />
<ImageView
android:id="@+id/image2"
android:layout_width="370sp"
android:layout_height="370sp"
android:layout_centerHorizontal="true"
/>
<TextView
android:id="@+id/resulttext2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="Growth Details"
android:textAlignment="textStart"
android:textColor="#212121"
android:textSize="15dp"
android:textStyle="bold" />
<Button
android:id="@+id/btnTreatment"
android:layout_width="wrap_content"
android:layout_height="68dp"
android:layout_margin="10dp"
android:layout_marginTop="10dp"
android:textColor="#FFFFFF"
android:textSize="18sp"
android:textStyle="bold"
android:text="TREATMENTS"/>
</LinearLayout>
\ No newline at end of file
<?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:layout_margin="10dp"
tools:context=".GrowthHeight">
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="108dp"
android:onClick="heightImage"
android:text="Height Measurement"
android:textAllCaps="false"
android:textSize="21sp"
android:textStyle="bold" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_alignParentBottom="true"
android:layout_centerVertical="true"
android:layout_marginTop="10dp"
android:layout_marginBottom="24dp"
android:text="Growth Threatment"
android:textAllCaps="false"
android:textSize="21sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:textColor="#009688"
android:text="Height Measurement"
android:textStyle="bold"
android:textSize="30sp"
android:id="@+id/height"
android:layout_marginTop="20sp"
/>
<ImageView
android:id="@+id/imageHeightView"
android:layout_width="370sp"
android:src="@drawable/a"
android:layout_height="370sp"
android:layout_below="@+id/height"
android:layout_centerHorizontal="true"
android:layout_marginTop="10sp"
android:onClick="heightImage" />
</RelativeLayout>
\ No newline at end of file
<?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:layout_height="match_parent"
android:orientation="vertical"
tools:context=".growthHome">
<LinearLayout
android:id="@+id/layer1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_marginLeft="120dp"
android:layout_marginTop="30dp"
app:srcCompat="@drawable/logo" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="Growth Management"
android:textStyle="italic"
android:textColor="@color/black"
android:layout_marginTop="10dp"
android:layout_marginLeft="60dp"
android:textSize="30dp"/>
</LinearLayout>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="173dp"
android:layout_marginRight="30dp"
app:cardCornerRadius="8dp"
android:layout_marginTop="30dp"
android:layout_marginLeft="30dp">
<LinearLayout
android:id="@+id/layer2"
android:background="@color/gray"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginLeft="30dp"
android:layout_marginTop="20dp"
android:layout_marginRight="30dp">
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
app:srcCompat="@drawable/rice" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="36dp"
android:textColor="@color/white"
android:text="Rice Plant Identification"/>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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=".GrowthThreatment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@+id/treatText1"
android:layout_margin="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GROWTH TREATMENTS"
android:textAlignment="center"
android:textColor="#009688"
android:textSize="20dp" />
<TextView
android:id="@+id/treatText2"
android:layout_marginTop="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Growth"
android:textAlignment="center"
android:textColor="#D32F2F"
android:textSize="20dp">
</TextView>
<ImageView
android:id="@+id/treatImg"
android:layout_width="196dp"
android:layout_height="226dp"
android:layout_marginTop="5dp">
</ImageView>
<TextView
android:id="@+id/treatText3"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Treatments"
android:textAlignment="viewStart"
android:textColor="#00BCD4"
android:textSize="20dp">
</TextView>
<TextView
android:id="@+id/treatText4"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Treatment Details"
android:textAlignment="viewStart"
android:textColor="#212121"
android:textStyle="bold"
android:textSize="15dp">
</TextView>
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?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:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Login">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textView16"
android:layout_width="wrap_content"
android:layout_height="62dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="40dp"
android:fontFamily="sans-serif-black"
android:text="@string/login"
android:textColor="#006400"
android:textSize="50dp" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="129dp"
android:layout_height="122dp"
android:layout_marginLeft="40dp"
app:srcCompat="@drawable/logo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="376dp"
android:layout_height="29dp"
android:layout_margin="10dp"
android:text="@string/email"
android:textColor="@color/black"
android:textColorHint="#FFFBFB"
android:textSize="24sp" />
<EditText
android:id="@+id/loginemail"
android:layout_width="match_parent"
android:layout_height="68dp"
android:hint="@string/email"
android:inputType="textPersonName"
android:padding="16dp"
android:textColorHint="#AFA4A4"/>
<TextView
android:id="@+id/textView4"
android:layout_width="match_parent"
android:layout_marginTop="10dp"
android:layout_height="36dp"
android:text="@string/password"
android:textColor="@color/black"
android:textSize="24sp" />
<EditText
android:id="@+id/loginpassword"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:hint="@string/password"
android:inputType="textPassword"
android:padding="16dp"
android:textColorHint="#AFA4A4" />
<CheckBox
android:id="@+id/rememmber_me"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="@color/black"
android:text="@string/rememberme"
android:textColorHint="#FFFBFB"
android:textSize="18sp" />
<Button
android:id="@+id/btnlogin"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:text="@string/login"
android:textColor="#EDE8E8"
android:textSize="18sp"/>
<TextView
android:id="@+id/txtdonthaveacc"
android:layout_width="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="60dp"
android:layout_height="wrap_content"
android:text="Don't Have Account? Register"
android:textColor="@color/black"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
<?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:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Register">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:orientation="horizontal">
<TextView
android:id="@+id/textView20"
android:layout_width="178dp"
android:layout_height="62dp"
android:layout_marginTop="40dp"
android:fontFamily="sans-serif-black"
android:text="@string/signup"
android:textColor="#006400"
android:textSize="50dp"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="129dp"
android:layout_height="122dp"
android:layout_marginTop="4dp"
android:layout_marginLeft="40dp"
app:srcCompat="@drawable/logo" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="30dp"
android:orientation="vertical"
android:layout_marginRight="20dp">
<EditText
android:id="@+id/registerfullName"
android:layout_width="match_parent"
android:layout_height="68dp"
android:hint="@string/fullName"
android:inputType="textPersonName"
android:padding="16dp"
android:textColor="#100E0E"
android:textColorHint="#817B7B" />
<EditText
android:id="@+id/registeremail"
android:layout_marginTop="10dp"
android:layout_width="match_parent"
android:layout_height="68dp"
android:drawableLeft="@drawable/ic_email"
android:hint="@string/email"
android:inputType="textEmailAddress"
android:padding="16dp"
android:textColor="#1E1818"
android:textColorHint="#958E8E"/>
<EditText
android:id="@+id/registermobile"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:backgroundTint="#120F0F"
android:drawableLeft="@drawable/ic_call"
android:hint="@string/mobile"
android:inputType="phone"
android:padding="16dp"
android:textColor="#000000"
android:textColorHint="#7C7676" />
<EditText
android:id="@+id/registerpassword"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:drawableLeft="@drawable/ic_lock"
android:hint="@string/password"
android:inputType="textPassword"
android:padding="16dp"
android:textColor="#0B0909"
android:textColorHint="#8E8282"/>
<EditText
android:id="@+id/registerretypepassowrd"
android:layout_width="match_parent"
android:layout_height="68dp"
android:layout_marginTop="10dp"
android:drawableLeft="@drawable/ic_lock"
android:hint="@string/retypepassword"
android:inputType="textPassword"
android:padding="16dp"
android:textColor="#100F0F"
android:textColorHint="#8A8080" />
<Button
android:id="@+id/btnregcreateaccount"
android:layout_width="match_parent"
android:layout_height="59dp"
android:layout_marginTop="10dp"
android:text="Create Account"
android:textColor="#E8DCDC"
android:textColorHint="#F1ECEC"
android:textSize="16dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="40dp"
android:orientation="horizontal">
<TextView
android:id="@+id/btnforgot"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_marginLeft="1dp"
android:layout_weight="1"
android:text="Already Have An Account?"
android:textColor="@color/black"
android:textSize="18sp" />
<TextView
android:id="@+id/txtsigiin"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:text="@string/signin"
android:textColor="@color/green"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:background="@drawable/back3"
tools:context=".SplashScreen">
<ImageView
android:id="@+id/imageView"
android:layout_width="213dp"
android:layout_height="199dp"
android:layout_marginStart="10dp"
android:layout_marginTop="36dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="32dp"
android:src="@drawable/logo"
android:transitionName="logo_image"
app:layout_constraintBottom_toTopOf="@+id/txthi"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.55"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/txthi"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="304dp"
android:layout_marginBottom="38dp"
android:text="WELCOME"
android:textAlignment="center"
android:textColor="@color/yellowgreen"
android:textSize="70sp"
android:transitionName="logo_text"
app:layout_constraintBottom_toTopOf="@+id/txtwelcm"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
<TextView
android:id="@+id/txtwelcm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:fontFamily="sans-serif-condensed-medium"
android:text="E-KETHA"
android:textAlignment="center"
android:textColor="@color/yellowgreen"
android:textSize="34sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txthi" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.EKetha" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/green</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="lawngreen">#7CFC00</color>
<color name="chartreuse">#7FFF00</color>
<color name="limegreen">#32CD32 </color>
<color name="lime">#00FF00 </color>
<color name="forestgreen">#228B22 </color>
<color name="green">#008000 </color>
<color name="darkgreen">#006400 </color>
<color name="greenyellow">#ADFF2F</color>
<color name="yellowgreen">#9ACD32</color>
<color name="springgreen">#00FF7F</color>
<color name="mediumspringgreen">#00FA9A</color>
<color name="lightgreen">#90EE90</color>
<color name="mediumseagreen">#3CB371</color>
<color name="seagreen">#2E8B57</color>
<color name="white">#FFFFFF</color>
<color name="gray">#484848</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">E ketha</string>
<string name="menu_home">Home</string>
<string name="menu_gallery">Gallery</string>
<string name="menu_slideshow">Contact Us</string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="rememberme">Remember Me</string>
<string name="login">Login</string>
<string name="forgotpassword">Forgot Password</string>
<string name="signup">Sign Up</string>
<string name="fullName">Full Name</string>
<string name="lastName">Last Name</string>
<string name="mobile">Mobile</string>
<string name="retypepassword">Retype Password</string>
<string name="signin">Sign In</string>
<string name="logout">Logout</string>
<string name="title_activity_adminpa">Adminpa</string>
<string name="changeprofile">Change Profile</string>
<string name="deleteprofile">Delete Profile</string>
<string name="save">Save</string>
<string name="cancel">Cancel</string>
<string name="oldpassword">Current Password</string>
<string name="newpassword">New Password</string>
<string name="changepassowrd">Change password</string>
<string name="confirmpassword">ConfirmPassowrd</string>
<string name="resetpassword">Reset Password</string>
<string name="detail1">
Leaf margins turn brown, beginning with the older leaves and moving outward, spreading to leaves toward the branch tip.
The browned leaves may drop from the tree.
Symptoms become progressively worse over a period of 3 to 8 years, until the entire tree turns brown prematurely.
Infected leafhoppers and spittlebugs feed on the succulent, terminal shoots of susceptible host trees, transmitting the bacteria.
There are no viable control options for the insect vectors.
</string>
<string name="treatment1">
• Maintain plant vigor. Keeping susceptible trees healthy and thriving can help them resist infection and survive longer once they are infected.\n\n
• Practice good sanitation. Branches that have died due to bacterial leaf scorch should be routinely removed. Infected trees that are in a severe state of decline should also be removed.\n\n
• Plant resistant species. In areas where bacterial leaf scorch has occurred, avoid planting highly susceptible trees.\n\n
• Antibiotic injections. Oxytetracycline root flare injections applied in spring can reduce bacterium levels and delay symptoms by a couple of weeks.
</string>
<string name="detail2">
Late blight (Phytophthora infestans) is among the most destructive plant disease.
Late blight is caused by a fungus, and it creates irregularly shaped splotches that are slimy and water-soaked.
The spores of this disease are fast-spreading, moving on the wind for miles. Plant only locally grown plants to help keep the pathogen out of your area.
</string>
<string name="treatment2">
• Once late blight strikes, there is little you can do.\n\n
• Tear out the plants, put them in a garbage bag, and throw them out to keep the disease from spreading.\n\n
• Organic fungicides based on Bacillus subtilis are somewhat effective in preventing this tea plant disease when it’s first discovered in your area.
</string>
<string name="detail3">
Bacterial spot is a widespread disease of tea in Sri Lanka, where rainfall and humidity levels promote disease development.
Bacterial spot reduces tea yield and quality by defoliation. The bacteria enter plants through natural openings or wounds.
The leaf spots produced in bacterial spot are nearly identical to those of bacterial speck, and are similar to the initial symptoms of the fungal disease Septoria leaf spot.
A general yellowing of heavily spotted areas on leaves occurs, followed by leaf scorch.
Blighting (rapid death) of foliage progresses upward from the lower leaves on heavily infected plants.
</string>
<string name="treatment3">
• Control of bacterial spot is difficult once it becomes established in the field. Therefore, it is imperative to start with clean seed and transplants.\n\n
• Transplants should be started from clean seed produced in an area where the disease does not occur, or from seed that is disinfested with hot water or chlorine bleach treatment.\n\n
• Remove and destroy diseased crop debris or incorporate it into soil soon after harvest is complete.\n\n
• A weekly spray program with bactericides (mixtures of copper and fungicide) reduces disease development and increases yield.
</string>
<string name="detail4">
Appearing as tiny, round splotches on the leaves, this disease typically starts on the lowest leaves first.
After the plants begin to develop, the lower leaves break out in yellow spots. Within the yellow spots, dark gray centers with dark borders appear.
Black dots appear in the center of the spots. Foliage dies and falls off.
</string>
<string name="treatment4">
• Cut off and destroy infected leaves as soon as you spot them and disinfect pruning equipment before moving from one plant to another.\n\n
• Avoid watering from the top, as the spray can force the spores developing on the leaves back into the soil and continue the disease cycle.\n\n
• Organic fungicides based on copper or Bacillus subtilis are effective against septoria leaf spot, especially when used as a preventative measure.
</string>
<string name="detail5">
The disease starts on the older leaves and spreads upwards.
The first signs are irregular-shaped spots (less than 1 mm) with a yellow margin.
Spread to all leaflets and to other leaves is rapid, causing the leaves to turn yellow, collapse and die. Spots also occur on the stems.
The spores are spread by wind-blown rain, and if windy wet weather continues for a few days, spread is fast and plants lose their leaves quickly.
Look for the disease on the bottom leaves. Look for tiny brown spots with yellow margins. Look for larger spots up to 10 mm that have ring patterns. Spots may be present on the stems and on the fruit.
</string>
<string name="treatment5">
• Do not plant new crops next to older ones that have the disease.\n\n
• Check all seedlings in the nursery, and throw away any with leaf spots.\n\n
• Remove a few branches from the lower part of the plants to allow better airflow at the base.\n\n
• Remove and burn the lower leaves as soon as the disease is seen.\n\n
• The fungicides products to use are chlorothalonil, copper oxychloride or mancozeb.\n\n
• Treatment should start when the first spots are seen and continue at 10-14-day intervals until 3-4 weeks before last harvest. It is important to spray both sides of the leaves.
</string>
</resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.EKetha" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryVariant">@color/green</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path
name="project_images"
path="Pictures/"/>
</paths>
\ No newline at end of file
package com.example.eketha;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url "https://chaquo.com/maven" }
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.2"
classpath 'com.google.gms:google-services:4.3.13'
classpath "com.chaquo.python:gradle:9.1.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.enableJetifier=true
\ No newline at end of file
#Sun Jul 10 14:47:39 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
rootProject.name = "E ketha"
include ':app'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment