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

small changes

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