Commit efeb0f51 authored by Salika952's avatar Salika952

add main activity changes

parent 15680fad
...@@ -35,36 +35,36 @@ public class MainActivity extends AppCompatActivity { ...@@ -35,36 +35,36 @@ public class MainActivity extends AppCompatActivity {
finish(); finish();
} }
}); });
// cardView1.setOnClickListener(new View.OnClickListener() { 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 // @Override
// public void onClick(View view) { // public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),pdHome.class); // Intent intent = new Intent(getApplicationContext(),weedHome.class);
// startActivity(intent); // startActivity(intent);
// } // }
// }); // });
// //
// cardView2.setOnClickListener(new View.OnClickListener() { // cardView3.setOnClickListener(new View.OnClickListener() {
// @Override // @Override
// public void onClick(View view) { // public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),weedHome.class); // Intent intent = new Intent(getApplicationContext(),fertilizerHome.class);
// startActivity(intent); // startActivity(intent);
// } // }
// }); // });
// //
// cardView3.setOnClickListener(new View.OnClickListener() { // cardView4.setOnClickListener(new View.OnClickListener() {
// @Override // @Override
// public void onClick(View view) { // public void onClick(View view) {
// Intent intent = new Intent(getApplicationContext(),fertilizerHome.class); // Intent intent = new Intent(getApplicationContext(),growthHome.class);
// startActivity(intent); // 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
<?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"
tools:context=".Diseases">
<Button
android:id="@+id/btnTakePicture"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/btnLaunchGallery"
android:layout_centerInParent="true"
android:background="@drawable/round_bg"
android:text="Take Picture"
android:textAllCaps="false"
android:textSize="21sp"
android:textStyle="bold" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:id="@+id/btnLaunchGallery"
android:background="@drawable/round_bg"
android:text="Launch Gallery"
android:textAllCaps="false"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_alignParentBottom="true"
android:textSize="21sp"
android:textStyle="bold"
/>
<ImageView
android:layout_width="370sp"
android:layout_height="370sp"
android:layout_centerHorizontal="true"
android:id="@+id/imageView1"
android:layout_marginTop="10sp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="Classified as:"
android:textStyle="bold"
android:textSize="20sp"
android:id="@+id/classified"
android:layout_below="@+id/imageView1"
android:layout_marginTop="10sp"
/>
<TextView
android:id="@+id/result1"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_below="@+id/classified"
android:layout_centerHorizontal="true"
android:text=""
android:textColor="#C30000"
android:textSize="27sp"
android:textStyle="bold" />
</RelativeLayout>
\ No newline at end of file
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