Commit 3fef12ba authored by MUDRA SAHU's avatar MUDRA SAHU

small changes

parent cb1ed8c4
...@@ -29,7 +29,9 @@ import androidx.core.content.FileProvider; ...@@ -29,7 +29,9 @@ import androidx.core.content.FileProvider;
import android.os.Environment; import android.os.Environment;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.view.View; import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast; import android.widget.Toast;
import java.io.File; import java.io.File;
...@@ -43,6 +45,8 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener ...@@ -43,6 +45,8 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
EditText place; EditText place;
EditText desc; EditText desc;
EditText date; EditText date;
Spinner category;
String[] items = new String[]{"Others","Electronic", "2", "three"};
static final int REQUEST_IMAGE_CAPTURE = 1; static final int REQUEST_IMAGE_CAPTURE = 1;
private static final int REQUEST_CAMERARESULT=201; private static final int REQUEST_CAMERARESULT=201;
private DatabaseReference mDatabase; private DatabaseReference mDatabase;
...@@ -62,14 +66,15 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener ...@@ -62,14 +66,15 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
setContentView(R.layout.activity_found_item); setContentView(R.layout.activity_found_item);
Toolbar toolbar = findViewById(R.id.toolbar); Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
title = findViewById(R.id.TITLE); title = findViewById(R.id.title);
place = findViewById(R.id.PLACE); place = findViewById(R.id.place);
desc = findViewById(R.id.DESC); desc = findViewById(R.id.desc);
date = findViewById(R.id.DATE); date = findViewById(R.id.date);
category = findViewById(R.id.category);
findViewById(R.id.camera).setOnClickListener(this); findViewById(R.id.camera).setOnClickListener(this);
findViewById(R.id.submit).setOnClickListener(this); findViewById(R.id.submit).setOnClickListener(this);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, items);
category.setAdapter(adapter);
} }
...@@ -77,6 +82,8 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener ...@@ -77,6 +82,8 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
String Title = title.getText().toString().trim(); String Title = title.getText().toString().trim();
String Place = place.getText().toString().trim(); String Place = place.getText().toString().trim();
String Desc = desc.getText().toString().trim(); String Desc = desc.getText().toString().trim();
String Date = date.getText().toString().trim();
Toast.makeText(FoundItem.this,"SUBMIT SUCCESSFUL",Toast.LENGTH_LONG).show(); Toast.makeText(FoundItem.this,"SUBMIT SUCCESSFUL",Toast.LENGTH_LONG).show();
} }
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
android:src="@drawable/camera" android:src="@drawable/camera"
android:minWidth="80dp" android:minWidth="80dp"
android:minHeight="80dp" android:minHeight="80dp"
android:layout_marginTop = "40dp" android:layout_marginTop = "30dp"
android:layout_marginLeft="40dp" android:layout_marginLeft="30dp"
/> />
<Spinner <Spinner
android:id="@+id/category" android:id="@+id/category"
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
android:layout_below = "@+id/camera" android:layout_below = "@+id/camera"
android:background="@android:drawable/btn_dropdown" android:background="@android:drawable/btn_dropdown"
android:spinnerMode="dropdown" android:spinnerMode="dropdown"
android:layout_marginTop = "20dp" android:layout_marginTop = "15dp"
android:layout_alignParentLeft = "true" android:layout_alignParentLeft = "true"
android:layout_alignParentStart = "true" android:layout_alignParentStart = "true"
android:layout_alignParentRight = "true" android:layout_alignParentRight = "true"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
android:focusable = "true" android:focusable = "true"
android:textColorHighlight = "#ff7eff15" android:textColorHighlight = "#ff7eff15"
android:textColorHint = "@color/hint_color" android:textColorHint = "@color/hint_color"
android:layout_marginTop = "20dp" android:layout_marginTop = "15dp"
android:layout_below = "@+id/category" android:layout_below = "@+id/category"
android:layout_alignParentLeft = "true" android:layout_alignParentLeft = "true"
android:layout_alignParentStart = "true" android:layout_alignParentStart = "true"
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
android:focusable = "true" android:focusable = "true"
android:textColorHighlight = "#ff7eff15" android:textColorHighlight = "#ff7eff15"
android:textColorHint = "@color/hint_color" android:textColorHint = "@color/hint_color"
android:layout_marginTop = "20dp" android:layout_marginTop = "15dp"
android:layout_below = "@+id/title" android:layout_below = "@+id/title"
android:layout_alignParentLeft = "true" android:layout_alignParentLeft = "true"
android:layout_alignParentStart = "true" android:layout_alignParentStart = "true"
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:textColorHighlight = "#ff7eff15" android:textColorHighlight = "#ff7eff15"
android:textColorHint = "@color/hint_color" android:textColorHint = "@color/hint_color"
android:layout_marginTop = "20dp" android:layout_marginTop = "15dp"
android:layout_below = "@+id/place" android:layout_below = "@+id/place"
android:layout_alignParentLeft = "true" android:layout_alignParentLeft = "true"
android:layout_alignParentStart = "true" android:layout_alignParentStart = "true"
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:background="@color/colorPrimary" android:background="@color/colorPrimary"
android:layout_marginBottom = "40dp"
/> />
<EditText <EditText
...@@ -102,7 +101,7 @@ ...@@ -102,7 +101,7 @@
android:inputType="date" android:inputType="date"
android:hint = "@string/date" android:hint = "@string/date"
android:layout_below = "@+id/desc" android:layout_below = "@+id/desc"
android:layout_marginTop = "20dp" android:layout_marginTop = "15dp"
android:layout_alignParentLeft = "true" android:layout_alignParentLeft = "true"
android:layout_alignParentStart = "true" android:layout_alignParentStart = "true"
android:layout_alignParentRight = "true" android:layout_alignParentRight = "true"
......
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