Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiLostAndFound
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
MUTTINENI NAVYA
InstiLostAndFound
Commits
3fef12ba
Commit
3fef12ba
authored
Oct 29, 2019
by
MUDRA SAHU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes
parent
cb1ed8c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
app/src/main/java/com/example/instilostandfound/FoundItem.java
...rc/main/java/com/example/instilostandfound/FoundItem.java
+13
-6
app/src/main/res/layout/content_found_item.xml
app/src/main/res/layout/content_found_item.xml
+7
-8
No files found.
app/src/main/java/com/example/instilostandfound/FoundItem.java
View file @
3fef12ba
...
...
@@ -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
();
}
...
...
app/src/main/res/layout/content_found_item.xml
View file @
3fef12ba
...
...
@@ -22,8 +22,8 @@
android:src=
"@drawable/camera"
android:minWidth=
"80dp"
android:minHeight=
"80dp"
android:layout_marginTop =
"
4
0dp"
android:layout_marginLeft=
"
4
0dp"
android:layout_marginTop =
"
3
0dp"
android:layout_marginLeft=
"
3
0dp"
/>
<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 =
"
20
dp"
android:layout_marginTop =
"
15
dp"
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 =
"
20
dp"
android:layout_marginTop =
"
15
dp"
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 =
"
20
dp"
android:layout_marginTop =
"
15
dp"
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 =
"
20
dp"
android:layout_marginTop =
"
15
dp"
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 =
"
20
dp"
android:layout_marginTop =
"
15
dp"
android:layout_alignParentLeft =
"true"
android:layout_alignParentStart =
"true"
android:layout_alignParentRight =
"true"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment