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
bee5f9cd
Commit
bee5f9cd
authored
Nov 22, 2019
by
MUDRA SAHU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
date feature
parent
4cb4265b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
340 additions
and
44 deletions
+340
-44
app/src/main/java/com/example/instilostandfound/CreateFoundObject.java
...java/com/example/instilostandfound/CreateFoundObject.java
+4
-4
app/src/main/java/com/example/instilostandfound/FoundItem.java
...rc/main/java/com/example/instilostandfound/FoundItem.java
+42
-8
app/src/main/java/com/example/instilostandfound/LostItem.java
...src/main/java/com/example/instilostandfound/LostItem.java
+123
-1
app/src/main/res/drawable/cameraup.jpeg
app/src/main/res/drawable/cameraup.jpeg
+0
-0
app/src/main/res/drawable/internet.jpg
app/src/main/res/drawable/internet.jpg
+0
-0
app/src/main/res/layout/activity_lost_item.xml
app/src/main/res/layout/activity_lost_item.xml
+37
-1
app/src/main/res/layout/content_found_item.xml
app/src/main/res/layout/content_found_item.xml
+3
-3
app/src/main/res/layout/content_lost_item.xml
app/src/main/res/layout/content_lost_item.xml
+129
-25
local.properties
local.properties
+2
-2
No files found.
app/src/main/java/com/example/instilostandfound/CreateFoundObject.java
View file @
bee5f9cd
...
@@ -18,7 +18,7 @@ public class CreateFoundObject implements Serializable {
...
@@ -18,7 +18,7 @@ public class CreateFoundObject implements Serializable {
private
String
mDescription
;
private
String
mDescription
;
private
String
mLocation
;
private
String
mLocation
;
private
String
mCategory
;
private
String
mCategory
;
private
Date
mDateFound
;
private
String
mDateFound
;
private
String
mtype
;
private
String
mtype
;
public
CreateFoundObject
()
{
public
CreateFoundObject
()
{
...
@@ -26,7 +26,7 @@ public class CreateFoundObject implements Serializable {
...
@@ -26,7 +26,7 @@ public class CreateFoundObject implements Serializable {
}
}
public
CreateFoundObject
(
String
LDAPID
,
String
title
,
String
imageUrl
,
String
location
,
String
desc
,
public
CreateFoundObject
(
String
LDAPID
,
String
title
,
String
imageUrl
,
String
location
,
String
desc
,
String
category
,
Date
datefound
,
String
type
)
{
String
category
,
String
datefound
,
String
type
)
{
if
(
LDAPID
.
trim
().
equals
(
""
))
{
if
(
LDAPID
.
trim
().
equals
(
""
))
{
mLDAP
=
"No Name"
;
mLDAP
=
"No Name"
;
}
}
...
@@ -76,9 +76,9 @@ public class CreateFoundObject implements Serializable {
...
@@ -76,9 +76,9 @@ public class CreateFoundObject implements Serializable {
public
void
setmCategory
(
String
category
)
public
void
setmCategory
(
String
category
)
{
mCategory
=
category
;
}
{
mCategory
=
category
;
}
public
Date
getmDateFound
()
public
String
getmDateFound
()
{
return
mDateFound
;
}
{
return
mDateFound
;
}
public
void
setmDateFound
(
Date
dateFound
)
public
void
setmDateFound
(
String
dateFound
)
{
mDateFound
=
dateFound
;
}
{
mDateFound
=
dateFound
;
}
public
String
getmDescription
()
public
String
getmDescription
()
...
...
app/src/main/java/com/example/instilostandfound/FoundItem.java
View file @
bee5f9cd
...
@@ -13,6 +13,8 @@ import com.google.firebase.storage.UploadTask;
...
@@ -13,6 +13,8 @@ import com.google.firebase.storage.UploadTask;
import
android.Manifest
;
import
android.Manifest
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.app.DatePickerDialog
;
import
android.app.Dialog
;
import
android.app.ProgressDialog
;
import
android.app.ProgressDialog
;
import
android.content.ContentResolver
;
import
android.content.ContentResolver
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -20,6 +22,8 @@ import android.content.Intent;
...
@@ -20,6 +22,8 @@ import android.content.Intent;
import
android.content.pm.PackageManager
;
import
android.content.pm.PackageManager
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.BitmapFactory
;
import
android.graphics.Color
;
import
android.graphics.drawable.ColorDrawable
;
import
android.icu.text.SimpleDateFormat
;
import
android.icu.text.SimpleDateFormat
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Build
;
...
@@ -43,9 +47,11 @@ import android.util.Log;
...
@@ -43,9 +47,11 @@ import android.util.Log;
import
android.view.View
;
import
android.view.View
;
import
android.webkit.MimeTypeMap
;
import
android.webkit.MimeTypeMap
;
import
android.widget.ArrayAdapter
;
import
android.widget.ArrayAdapter
;
import
android.widget.DatePicker
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.Spinner
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
...
@@ -55,17 +61,19 @@ import java.io.IOException;
...
@@ -55,17 +61,19 @@ import java.io.IOException;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.net.URI
;
import
java.net.URI
;
import
java.net.URL
;
import
java.net.URL
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Random
;
import
java.util.Random
;
//import static android.app.Activity.RESULT_OK;
//import static android.app.Activity.RESULT_OK;
//import com.squareup.picasso.Picasso;
//import com.squareup.picasso.Picasso;
public
class
FoundItem
extends
AppCompatActivity
implements
View
.
OnClickListener
,
Serializable
{
public
class
FoundItem
extends
AppCompatActivity
implements
View
.
OnClickListener
,
Serializable
{
private
static
final
String
TAG
=
FoundItem
.
class
.
getSimpleName
();
;
//private FirebaseAuth mAuth;
//private FirebaseAuth mAuth;
EditText
title
;
EditText
title
;
EditText
place
;
EditText
place
;
EditText
desc
;
EditText
desc
;
EditText
date
;
TextView
date
;
Spinner
category
;
Spinner
category
;
String
username
;
String
username
;
ImageView
camera
;
ImageView
camera
;
...
@@ -83,7 +91,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
...
@@ -83,7 +91,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
private
boolean
updatedata
;
private
boolean
updatedata
;
public
String
tempUri
;
public
String
tempUri
;
DatePickerDialog
.
OnDateSetListener
dateSetListener
;
// ...
// ...
FirebaseDatabase
database
=
FirebaseDatabase
.
getInstance
();
FirebaseDatabase
database
=
FirebaseDatabase
.
getInstance
();
DatabaseReference
myRef
=
FirebaseDatabase
.
getInstance
().
getReference
(
"FoundData"
);
DatabaseReference
myRef
=
FirebaseDatabase
.
getInstance
().
getReference
(
"FoundData"
);
...
@@ -109,6 +117,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
...
@@ -109,6 +117,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
pd
=
new
ProgressDialog
(
this
);
pd
=
new
ProgressDialog
(
this
);
pd
.
setMessage
(
"Uploading...."
);
pd
.
setMessage
(
"Uploading...."
);
date
.
setOnClickListener
(
this
);
if
(
callingclass
.
equals
(
"MyPosts"
))
if
(
callingclass
.
equals
(
"MyPosts"
))
{
{
CreateFoundObject
objectfound
=
(
CreateFoundObject
)
getIntent
().
getSerializableExtra
(
"FoundObject"
);
CreateFoundObject
objectfound
=
(
CreateFoundObject
)
getIntent
().
getSerializableExtra
(
"FoundObject"
);
...
@@ -116,7 +125,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
...
@@ -116,7 +125,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
title
.
setText
(
objectfound
.
getmTitle
());
title
.
setText
(
objectfound
.
getmTitle
());
place
.
setText
(
objectfound
.
getmLocation
());
place
.
setText
(
objectfound
.
getmLocation
());
desc
.
setText
(
objectfound
.
getmDescription
());
desc
.
setText
(
objectfound
.
getmDescription
());
date
.
setText
(
objectfound
.
get
Date
());
date
.
setText
(
objectfound
.
get
mDateFound
());
Picasso
.
with
(
FoundItem
.
this
).
load
(
objectfound
.
getImageUrl
())
Picasso
.
with
(
FoundItem
.
this
).
load
(
objectfound
.
getImageUrl
())
.
fit
()
.
fit
()
.
centerCrop
()
.
centerCrop
()
...
@@ -208,12 +217,12 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
...
@@ -208,12 +217,12 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
Date
datef
=
new
Date
();
Date
datef
=
new
Date
();
if
(
updatedata
)
if
(
updatedata
)
{
{
upload
=
new
CreateFoundObject
(
username
,
Title
,
tempUri
,
"location"
,
Desc
,
upload
=
new
CreateFoundObject
(
username
,
Title
,
tempUri
,
Place
,
Desc
,
"category"
,
datef
,
"found"
);
"category"
,
Date
,
"found"
);
}
}
else
{
else
{
upload
=
new
CreateFoundObject
(
username
,
Title
,
uri
.
toString
(),
"location"
,
Desc
,
upload
=
new
CreateFoundObject
(
username
,
Title
,
uri
.
toString
(),
Place
,
Desc
,
"category"
,
datef
,
"found"
);
"category"
,
Date
,
"found"
);
}
}
String
uploadId
=
myRef
.
push
().
getKey
();
String
uploadId
=
myRef
.
push
().
getKey
();
Log
.
v
(
"UploadID"
,
uploadId
);
Log
.
v
(
"UploadID"
,
uploadId
);
...
@@ -250,7 +259,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
...
@@ -250,7 +259,7 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
Date
datef
=
new
Date
();
Date
datef
=
new
Date
();
Toast
.
makeText
(
FoundItem
.
this
,
"No file selected"
,
Toast
.
LENGTH_SHORT
).
show
();
Toast
.
makeText
(
FoundItem
.
this
,
"No file selected"
,
Toast
.
LENGTH_SHORT
).
show
();
CreateFoundObject
upload
=
new
CreateFoundObject
(
username
,
Title
,
"NO-IMAGE"
,
"location"
,
Desc
,
CreateFoundObject
upload
=
new
CreateFoundObject
(
username
,
Title
,
"NO-IMAGE"
,
"location"
,
Desc
,
"category"
,
datef
,
"found"
);
"category"
,
Date
,
"found"
);
String
uploadId
=
myRef
.
push
().
getKey
();
String
uploadId
=
myRef
.
push
().
getKey
();
Log
.
v
(
"UploadID"
,
uploadId
);
Log
.
v
(
"UploadID"
,
uploadId
);
myRef
.
child
(
uploadId
).
setValue
(
upload
);
myRef
.
child
(
uploadId
).
setValue
(
upload
);
...
@@ -305,8 +314,33 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
...
@@ -305,8 +314,33 @@ public class FoundItem extends AppCompatActivity implements View.OnClickListener
intent
.
setAction
(
Intent
.
ACTION_PICK
);
intent
.
setAction
(
Intent
.
ACTION_PICK
);
startActivityForResult
(
Intent
.
createChooser
(
intent
,
"Select Image"
),
PICK_IMAGE_REQUEST
);
startActivityForResult
(
Intent
.
createChooser
(
intent
,
"Select Image"
),
PICK_IMAGE_REQUEST
);
break
;
break
;
case
R
.
id
.
date
:
Calendar
cal
=
Calendar
.
getInstance
();
int
year
=
cal
.
get
(
Calendar
.
YEAR
);
int
month
=
cal
.
get
(
Calendar
.
MONTH
);
int
day
=
cal
.
get
(
Calendar
.
DAY_OF_MONTH
);
DatePickerDialog
dialog
=
new
DatePickerDialog
(
FoundItem
.
this
,
android
.
R
.
style
.
Theme_Black
,
dateSetListener
,
year
,
month
,
day
);
dialog
.
getWindow
().
setBackgroundDrawable
(
new
ColorDrawable
(
Color
.
TRANSPARENT
));
dialog
.
show
();
dateSetListener
=
new
DatePickerDialog
.
OnDateSetListener
()
{
@Override
public
void
onDateSet
(
DatePicker
datePicker
,
int
year
,
int
month
,
int
day
)
{
month
=
month
+
1
;
Log
.
d
(
TAG
,
"onDateSet: mm/dd/yyy: "
+
month
+
"/"
+
day
+
"/"
+
year
);
String
dt
=
month
+
"/"
+
day
+
"/"
+
year
;
date
.
setText
(
dt
);
}
};
break
;
}
}
}
}
@Override
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
...
...
app/src/main/java/com/example/instilostandfound/LostItem.java
View file @
bee5f9cd
package
com.example.instilostandfound
;
package
com.example.instilostandfound
;
import
android.app.DatePickerDialog
;
import
android.app.ProgressDialog
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.graphics.drawable.ColorDrawable
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
com.google.android.material.floatingactionbutton.FloatingActionButton
;
import
com.google.android.material.floatingactionbutton.FloatingActionButton
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.android.material.snackbar.Snackbar
;
import
com.google.firebase.database.DatabaseReference
;
import
com.google.firebase.storage.StorageTask
;
import
com.squareup.picasso.Picasso
;
import
androidx.annotation.RequiresApi
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.app.AppCompatActivity
;
import
androidx.appcompat.widget.Toolbar
;
import
androidx.appcompat.widget.Toolbar
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.ArrayAdapter
;
import
android.widget.DatePicker
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
public
class
LostItem
extends
AppCompatActivity
{
import
java.io.Serializable
;
import
java.util.Calendar
;
public
class
LostItem
extends
AppCompatActivity
implements
View
.
OnClickListener
,
Serializable
{
private
static
final
String
TAG
=
FoundItem
.
class
.
getSimpleName
();
;
EditText
title
;
EditText
place
;
EditText
desc
;
TextView
date
;
Spinner
category
;
String
username
;
ImageView
camera
;
String
[]
items
=
new
String
[]{
"Others"
,
"Electronics"
,
"Documents"
,
"Clothes"
};
private
static
final
int
CAMERA_REQUEST
=
1888
;
private
ImageView
imageView
;
private
static
final
int
MY_CAMERA_PERMISSION_CODE
=
100
;
private
DatabaseReference
mDatabase
;
public
Uri
mImageUri
;
public
Uri
uploadSessionUri
;
int
PICK_IMAGE_REQUEST
=
111
;
public
String
callingclass
;
ProgressDialog
pd
;
private
StorageTask
mUploadTask
;
private
boolean
updatedata
;
public
String
tempUri
;
DatePickerDialog
.
OnDateSetListener
dateSetListener
;
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_lost_item
);
setContentView
(
R
.
layout
.
activity_lost_item
);
Toolbar
toolbar
=
findViewById
(
R
.
id
.
toolbar
);
Toolbar
toolbar
=
findViewById
(
R
.
id
.
toolbar
);
setSupportActionBar
(
toolbar
);
setSupportActionBar
(
toolbar
);
username
=
getIntent
().
getStringExtra
(
"username"
);
callingclass
=
getIntent
().
getStringExtra
(
"CallingClass"
);
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
);
camera
=
findViewById
(
R
.
id
.
camera
);
camera
.
setOnClickListener
(
this
);
pd
=
new
ProgressDialog
(
this
);
pd
.
setMessage
(
"Uploading...."
);
date
.
setOnClickListener
(
this
);
/*FloatingActionButton fab = findViewById(R.id.fab);
/*FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
fab.setOnClickListener(new View.OnClickListener() {
...
@@ -27,6 +84,71 @@ public class LostItem extends AppCompatActivity {
...
@@ -27,6 +84,71 @@ public class LostItem extends AppCompatActivity {
.setAction("Action", null).show();
.setAction("Action", null).show();
}
}
});*/
});*/
findViewById
(
R
.
id
.
submit
).
setOnClickListener
(
this
);
ArrayAdapter
<
String
>
adapter
=
new
ArrayAdapter
<>(
this
,
android
.
R
.
layout
.
simple_spinner_dropdown_item
,
items
);
category
.
setAdapter
(
adapter
);
}
@RequiresApi
(
api
=
Build
.
VERSION_CODES
.
N
)
public
void
onClick
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
submit
:
//SubmitFound();
break
;
case
R
.
id
.
camera
:
Intent
intent
=
new
Intent
();
intent
.
setType
(
"image/*"
);
intent
.
setAction
(
Intent
.
ACTION_PICK
);
startActivityForResult
(
Intent
.
createChooser
(
intent
,
"Select Image"
),
PICK_IMAGE_REQUEST
);
break
;
case
R
.
id
.
date
:
Calendar
cal
=
Calendar
.
getInstance
();
int
year
=
cal
.
get
(
Calendar
.
YEAR
);
int
month
=
cal
.
get
(
Calendar
.
MONTH
);
int
day
=
cal
.
get
(
Calendar
.
DAY_OF_MONTH
);
DatePickerDialog
dialog
=
new
DatePickerDialog
(
LostItem
.
this
,
android
.
R
.
style
.
Theme_Black
,
dateSetListener
,
year
,
month
,
day
);
dialog
.
getWindow
().
setBackgroundDrawable
(
new
ColorDrawable
(
Color
.
TRANSPARENT
));
dialog
.
show
();
dateSetListener
=
new
DatePickerDialog
.
OnDateSetListener
()
{
@Override
public
void
onDateSet
(
DatePicker
datePicker
,
int
year
,
int
month
,
int
day
)
{
month
=
month
+
1
;
Log
.
d
(
TAG
,
"onDateSet: mm/dd/yyy: "
+
month
+
"/"
+
day
+
"/"
+
year
);
String
dt
=
month
+
"/"
+
day
+
"/"
+
year
;
date
.
setText
(
dt
);
}
};
break
;
}
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
PICK_IMAGE_REQUEST
&&
resultCode
==
RESULT_OK
&&
data
!=
null
&&
data
.
getData
()
!=
null
)
{
mImageUri
=
data
.
getData
();
try
{
//getting image from gallery
//Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), mImageUri);
//Setting image to ImageView
//camera.setImageBitmap(bitmap);
Picasso
.
with
(
LostItem
.
this
).
load
(
mImageUri
)
.
fit
()
.
centerCrop
()
.
into
(
camera
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
app/src/main/res/drawable/cameraup.jpeg
0 → 100644
View file @
bee5f9cd
5.67 KB
app/src/main/res/drawable/internet.jpg
0 → 100644
View file @
bee5f9cd
11.1 KB
app/src/main/res/layout/activity_lost_item.xml
View file @
bee5f9cd
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
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=
".LostItem"
>
<com.google.android.material.appbar.AppBarLayout
android:id=
"@+id/appbar"
android:layout_width=
"match_parent"
android:layout_height=
"192dp"
android:fitsSystemWindows=
"true"
android:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:id=
"@+id/camera"
android:src=
"@drawable/cameraup"
android:minWidth=
"80dp"
android:minHeight=
"100dp"
/>
<androidx.appcompat.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
app:popupTheme=
"@style/AppTheme.PopupOverlay"
/>
</com.google.android.material.appbar.AppBarLayout>
<include
layout=
"@layout/content_lost_item"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<!--<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:tools="http://schemas.android.com/tools"
...
@@ -30,4 +66,4 @@
...
@@ -30,4 +66,4 @@
android:layout_margin="@dimen/fab_margin"
android:layout_margin="@dimen/fab_margin"
app:srcCompat="@android:drawable/ic_dialog_email" />
app:srcCompat="@android:drawable/ic_dialog_email" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>-->
\ No newline at end of file
app/src/main/res/layout/content_found_item.xml
View file @
bee5f9cd
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
app:layout_behavior=
"@string/appbar_scrolling_view_behavior"
tools:context=
".
Lost
Item"
tools:context=
".
Found
Item"
tools:showIn=
"@layout/activity_
lost
_item"
tools:showIn=
"@layout/activity_
found
_item"
android:paddingLeft=
"@dimen/activity_horizontal_margin"
android:paddingLeft=
"@dimen/activity_horizontal_margin"
android:paddingRight =
"@dimen/activity_horizontal_margin"
android:paddingRight =
"@dimen/activity_horizontal_margin"
android:paddingTop =
"@dimen/activity_vertical_margin"
android:paddingTop =
"@dimen/activity_vertical_margin"
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
android:background=
"@color/colorPrimary"
android:background=
"@color/colorPrimary"
/>
/>
<
EditText
<
TextView
android:id=
"@+id/date"
android:id=
"@+id/date"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/content_lost_item.xml
View file @
bee5f9cd
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
...
@@ -15,6 +16,109 @@
...
@@ -15,6 +16,109 @@
>
>
<Spinner
android:id=
"@+id/category"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below =
"@+id/camera"
android:background=
"@android:drawable/btn_dropdown"
android:spinnerMode=
"dropdown"
android:layout_marginTop =
"15dp"
android:layout_alignParentLeft =
"true"
android:layout_alignParentStart =
"true"
android:layout_alignParentRight =
"true"
android:layout_alignParentEnd =
"true"
/>
<EditText
android:layout_width =
"wrap_content"
android:layout_height =
"wrap_content"
android:id =
"@+id/title"
android:hint =
"@string/title"
android:focusable =
"true"
android:textColorHighlight =
"#ff7eff15"
android:textColorHint =
"@color/hint_color"
android:layout_marginTop =
"15dp"
android:layout_below =
"@+id/category"
android:layout_alignParentLeft =
"true"
android:layout_alignParentStart =
"true"
android:layout_alignParentRight =
"true"
android:layout_alignParentEnd =
"true"
/>
<EditText
android:layout_width =
"wrap_content"
android:layout_height =
"wrap_content"
android:id =
"@+id/place"
android:hint =
"@string/place"
android:focusable =
"true"
android:textColorHighlight =
"#ff7eff15"
android:textColorHint =
"@color/hint_color"
android:layout_marginTop =
"15dp"
android:layout_below =
"@+id/title"
android:layout_alignParentLeft =
"true"
android:layout_alignParentStart =
"true"
android:layout_alignParentRight =
"true"
android:layout_alignParentEnd =
"true"
/>
<EditText
android:layout_width =
"wrap_content"
android:layout_height =
"wrap_content"
android:id =
"@+id/desc"
android:hint =
"@string/desc"
android:focusable =
"true"
android:ems=
"10"
android:gravity=
"start|top"
android:inputType=
"textMultiLine"
android:textColorHighlight =
"#ff7eff15"
android:textColorHint =
"@color/hint_color"
android:layout_marginTop =
"15dp"
android:layout_below =
"@+id/place"
android:layout_alignParentLeft =
"true"
android:layout_alignParentStart =
"true"
android:layout_alignParentRight =
"true"
android:layout_alignParentEnd =
"true"
/>
<Button
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/submit"
android:id=
"@+id/submit"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@color/colorPrimary"
/>
<TextView
android:id=
"@+id/date"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:inputType=
"date"
android:hint =
"@string/date"
android:layout_below =
"@+id/desc"
android:layout_marginTop =
"15dp"
android:layout_alignParentLeft =
"true"
android:layout_alignParentStart =
"true"
android:layout_alignParentRight =
"true"
android:layout_alignParentEnd =
"true"
/>
</RelativeLayout>
<!--<?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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".LostItem"
tools:showIn="@layout/activity_lost_item"
android:paddingLeft= "@dimen/activity_horizontal_margin"
android:paddingRight = "@dimen/activity_horizontal_margin"
android:paddingTop = "@dimen/activity_vertical_margin"
android:paddingBottom = "@dimen/activity_vertical_margin"
>
<ImageView
<ImageView
android:layout_width="wrap_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="wrap_content"
...
@@ -109,4 +213,4 @@
...
@@ -109,4 +213,4 @@
android:layout_alignParentEnd = "true"/>
android:layout_alignParentEnd = "true"/>
</RelativeLayout>
</RelativeLayout>-->
\ No newline at end of file
local.properties
View file @
bee5f9cd
...
@@ -4,5 +4,5 @@
...
@@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# For customization when using a Version Control System, please read the
# header note.
# header note.
#
Tue Nov 05 08:12
:27 IST 2019
#
Wed Nov 06 11:55
:27 IST 2019
sdk.dir
=
/home/
chikki
/Android/Sdk
sdk.dir
=
/home/
abc
/Android/Sdk
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