Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
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
RAHUL SHARMA
InstiApp
Commits
fb6ce3a0
Commit
fb6ce3a0
authored
Jul 14, 2018
by
Sajal Narang
Committed by
GitHub
Jul 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #153 from pulsejet/explore
Add Explore
parents
664e9a37
41006f57
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
392 additions
and
12 deletions
+392
-12
app/src/main/java/app/insti/MainActivity.java
app/src/main/java/app/insti/MainActivity.java
+19
-1
app/src/main/java/app/insti/adapter/BodyAdapter.java
app/src/main/java/app/insti/adapter/BodyAdapter.java
+3
-1
app/src/main/java/app/insti/adapter/FeedAdapter.java
app/src/main/java/app/insti/adapter/FeedAdapter.java
+4
-0
app/src/main/java/app/insti/adapter/UserAdapter.java
app/src/main/java/app/insti/adapter/UserAdapter.java
+4
-0
app/src/main/java/app/insti/api/RetrofitInterface.java
app/src/main/java/app/insti/api/RetrofitInterface.java
+6
-2
app/src/main/java/app/insti/api/model/ExploreResponse.java
app/src/main/java/app/insti/api/model/ExploreResponse.java
+48
-0
app/src/main/java/app/insti/fragment/ExploreFragment.java
app/src/main/java/app/insti/fragment/ExploreFragment.java
+224
-0
app/src/main/java/app/insti/fragment/MapFragment.java
app/src/main/java/app/insti/fragment/MapFragment.java
+2
-8
app/src/main/res/drawable/ic_search_black_24dp.xml
app/src/main/res/drawable/ic_search_black_24dp.xml
+9
-0
app/src/main/res/layout/fragment_explore.xml
app/src/main/res/layout/fragment_explore.xml
+68
-0
app/src/main/res/menu/activity_main_drawer.xml
app/src/main/res/menu/activity_main_drawer.xml
+5
-0
No files found.
app/src/main/java/app/insti/MainActivity.java
View file @
fb6ce3a0
package
app.insti
;
package
app.insti
;
import
android.Manifest
;
import
android.Manifest
;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.content.pm.PackageManager
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -19,6 +20,7 @@ import android.util.Log;
...
@@ -19,6 +20,7 @@ import android.util.Log;
import
android.view.Menu
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.View
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
android.widget.Toast
;
...
@@ -30,6 +32,7 @@ import app.insti.data.Body;
...
@@ -30,6 +32,7 @@ import app.insti.data.Body;
import
app.insti.data.User
;
import
app.insti.data.User
;
import
app.insti.fragment.BodyFragment
;
import
app.insti.fragment.BodyFragment
;
import
app.insti.fragment.CalendarFragment
;
import
app.insti.fragment.CalendarFragment
;
import
app.insti.fragment.ExploreFragment
;
import
app.insti.fragment.FeedFragment
;
import
app.insti.fragment.FeedFragment
;
import
app.insti.fragment.MapFragment
;
import
app.insti.fragment.MapFragment
;
import
app.insti.fragment.MessMenuFragment
;
import
app.insti.fragment.MessMenuFragment
;
...
@@ -215,10 +218,16 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -215,10 +218,16 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
Toast
.
makeText
(
this
,
Constants
.
LOGIN_MESSAGE
,
Toast
.
LENGTH_LONG
).
show
();
Toast
.
makeText
(
this
,
Constants
.
LOGIN_MESSAGE
,
Toast
.
LENGTH_LONG
).
show
();
}
}
break
;
break
;
case
R
.
id
.
nav_explore
:
updateFragment
(
ExploreFragment
.
newInstance
());
break
;
case
R
.
id
.
nav_news
:
case
R
.
id
.
nav_news
:
NewsFragment
newsFragment
=
new
NewsFragment
();
NewsFragment
newsFragment
=
new
NewsFragment
();
updateFragment
(
newsFragment
);
updateFragment
(
newsFragment
);
break
;
break
;
case
R
.
id
.
nav_placement_blog
:
case
R
.
id
.
nav_placement_blog
:
if
(
session
.
isLoggedIn
())
{
if
(
session
.
isLoggedIn
())
{
PlacementBlogFragment
placementBlogFragment
=
new
PlacementBlogFragment
();
PlacementBlogFragment
placementBlogFragment
=
new
PlacementBlogFragment
();
...
@@ -345,5 +354,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
...
@@ -345,5 +354,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
return
true
;
return
true
;
}
}
public
static
void
hideKeyboard
(
Activity
activity
)
{
InputMethodManager
imm
=
(
InputMethodManager
)
activity
.
getSystemService
(
Activity
.
INPUT_METHOD_SERVICE
);
//Find the currently focused view, so we can grab the correct window token from it.
View
view
=
activity
.
getCurrentFocus
();
//If no view currently has focus, create a new one, just so we can grab a window token from it
if
(
view
==
null
)
{
view
=
new
View
(
activity
);
}
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
}
}
}
app/src/main/java/app/insti/adapter/BodyAdapter.java
View file @
fb6ce3a0
...
@@ -71,7 +71,9 @@ public class BodyAdapter extends RecyclerView.Adapter<BodyAdapter.ViewHolder> {
...
@@ -71,7 +71,9 @@ public class BodyAdapter extends RecyclerView.Adapter<BodyAdapter.ViewHolder> {
description
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
body_card_description
);
description
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
body_card_description
);
image
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
body_card_avatar
);
image
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
body_card_avatar
);
}
}
}
public
void
setBodyList
(
List
<
Body
>
bodyList
)
{
this
.
bodyList
=
bodyList
;
}
}
}
}
app/src/main/java/app/insti/adapter/FeedAdapter.java
View file @
fb6ce3a0
...
@@ -101,4 +101,8 @@ public class FeedAdapter extends RecyclerView.Adapter<FeedAdapter.ViewHolder> {
...
@@ -101,4 +101,8 @@ public class FeedAdapter extends RecyclerView.Adapter<FeedAdapter.ViewHolder> {
eventVenue
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
event_venue
);
eventVenue
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
event_venue
);
}
}
}
}
public
void
setPosts
(
List
<
Event
>
posts
)
{
this
.
posts
=
posts
;
}
}
}
app/src/main/java/app/insti/adapter/UserAdapter.java
View file @
fb6ce3a0
...
@@ -74,4 +74,8 @@ public class UserAdapter extends RecyclerView.Adapter<UserAdapter.ViewHolder> {
...
@@ -74,4 +74,8 @@ public class UserAdapter extends RecyclerView.Adapter<UserAdapter.ViewHolder> {
image
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
role_card_avatar
);
image
=
(
ImageView
)
itemView
.
findViewById
(
R
.
id
.
role_card_avatar
);
}
}
}
}
public
void
setUserList
(
List
<
User
>
userList
)
{
this
.
userList
=
userList
;
}
}
}
app/src/main/java/app/insti/api/RetrofitInterface.java
View file @
fb6ce3a0
...
@@ -4,6 +4,7 @@ import java.util.List;
...
@@ -4,6 +4,7 @@ import java.util.List;
import
app.insti.api.model.EventCreateRequest
;
import
app.insti.api.model.EventCreateRequest
;
import
app.insti.api.model.EventCreateResponse
;
import
app.insti.api.model.EventCreateResponse
;
import
app.insti.api.model.ExploreResponse
;
import
app.insti.api.model.ImageUploadRequest
;
import
app.insti.api.model.ImageUploadRequest
;
import
app.insti.api.model.ImageUploadResponse
;
import
app.insti.api.model.ImageUploadResponse
;
import
app.insti.api.model.LoginResponse
;
import
app.insti.api.model.LoginResponse
;
...
@@ -51,6 +52,9 @@ public interface RetrofitInterface {
...
@@ -51,6 +52,9 @@ public interface RetrofitInterface {
@GET
(
"bodies/{uuid}"
)
@GET
(
"bodies/{uuid}"
)
Call
<
app
.
insti
.
data
.
Body
>
getBody
(
@Header
(
"Cookie"
)
String
sessionId
,
@Path
(
"uuid"
)
String
uuid
);
Call
<
app
.
insti
.
data
.
Body
>
getBody
(
@Header
(
"Cookie"
)
String
sessionId
,
@Path
(
"uuid"
)
String
uuid
);
@GET
(
"bodies"
)
Call
<
List
<
app
.
insti
.
data
.
Body
>>
getAllBodies
(
@Header
(
"Cookie"
)
String
sessionId
);
@GET
(
"bodies/{bodyID}/follow"
)
@GET
(
"bodies/{bodyID}/follow"
)
Call
<
Void
>
updateBodyFollowing
(
@Header
(
"Cookie"
)
String
sessionID
,
@Path
(
"bodyID"
)
String
eventID
,
@Query
(
"action"
)
int
action
);
Call
<
Void
>
updateBodyFollowing
(
@Header
(
"Cookie"
)
String
sessionID
,
@Path
(
"bodyID"
)
String
eventID
,
@Query
(
"action"
)
int
action
);
...
@@ -81,6 +85,6 @@ public interface RetrofitInterface {
...
@@ -81,6 +85,6 @@ public interface RetrofitInterface {
@GET
(
"logout"
)
@GET
(
"logout"
)
Call
<
Void
>
logout
(
@Header
(
"Cookie"
)
String
sessionID
);
Call
<
Void
>
logout
(
@Header
(
"Cookie"
)
String
sessionID
);
// @POST("getNotifications/
")
@GET
(
"search
"
)
// Call<NotificationsResponse> getNotifications(@Body NotificationsRequest notificationsRequest
);
Call
<
ExploreResponse
>
search
(
@Header
(
"Cookie"
)
String
sessionID
,
@Query
(
"query"
)
String
query
);
}
}
app/src/main/java/app/insti/api/model/ExploreResponse.java
0 → 100644
View file @
fb6ce3a0
package
app.insti.api.model
;
import
com.google.gson.annotations.SerializedName
;
import
java.util.List
;
import
app.insti.data.Body
;
import
app.insti.data.Event
;
import
app.insti.data.User
;
public
class
ExploreResponse
{
@SerializedName
(
"bodies"
)
private
List
<
Body
>
bodies
;
@SerializedName
(
"events"
)
private
List
<
Event
>
events
;
@SerializedName
(
"users"
)
private
List
<
User
>
users
;
public
ExploreResponse
(
List
<
Body
>
bodies
,
List
<
Event
>
events
,
List
<
User
>
users
)
{
this
.
bodies
=
bodies
;
this
.
events
=
events
;
this
.
users
=
users
;
}
public
List
<
Body
>
getBodies
()
{
return
bodies
;
}
public
void
setBodies
(
List
<
Body
>
bodies
)
{
this
.
bodies
=
bodies
;
}
public
List
<
Event
>
getEvents
()
{
return
events
;
}
public
void
setEvents
(
List
<
Event
>
events
)
{
this
.
events
=
events
;
}
public
List
<
User
>
getUsers
()
{
return
users
;
}
public
void
setUsers
(
List
<
User
>
users
)
{
this
.
users
=
users
;
}
}
app/src/main/java/app/insti/fragment/ExploreFragment.java
0 → 100644
View file @
fb6ce3a0
package
app.insti.fragment
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.EditText
;
import
com.google.gson.Gson
;
import
java.util.ArrayList
;
import
java.util.List
;
import
app.insti.Constants
;
import
app.insti.ItemClickListener
;
import
app.insti.MainActivity
;
import
app.insti.R
;
import
app.insti.adapter.BodyAdapter
;
import
app.insti.adapter.FeedAdapter
;
import
app.insti.adapter.UserAdapter
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.ServiceGenerator
;
import
app.insti.api.model.ExploreResponse
;
import
app.insti.data.Body
;
import
app.insti.data.Event
;
import
app.insti.data.User
;
import
retrofit2.Call
;
import
retrofit2.Callback
;
import
retrofit2.Response
;
/**
* A simple {@link Fragment} subclass.
* Use the {@link ExploreFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
ExploreFragment
extends
Fragment
{
private
String
sessionId
;
private
List
<
Body
>
allBodies
=
new
ArrayList
<>();
private
List
<
Body
>
bodies
=
new
ArrayList
<>();
private
List
<
Event
>
events
=
new
ArrayList
<>();
private
List
<
User
>
users
=
new
ArrayList
<>();
private
BodyAdapter
bodyAdapter
;
private
FeedAdapter
eventsAdapter
;
private
UserAdapter
userAdapter
;
public
ExploreFragment
()
{
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment.
* @return A new instance of fragment ExploreFragment.
*/
// TODO: Rename and change types and number of parameters
public
static
ExploreFragment
newInstance
()
{
ExploreFragment
fragment
=
new
ExploreFragment
();
return
fragment
;
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
}
@Override
public
void
onStart
()
{
super
.
onStart
();
// Initialize
sessionId
=
((
MainActivity
)
getActivity
()).
getSessionIDHeader
();
initRecyclerViews
();
// Get all bodies
if
(
allBodies
.
size
()
==
0
)
{
RetrofitInterface
retrofitInterface
=
ServiceGenerator
.
createService
(
RetrofitInterface
.
class
);
retrofitInterface
.
getAllBodies
(
sessionId
).
enqueue
(
new
Callback
<
List
<
Body
>>()
{
@Override
public
void
onResponse
(
Call
<
List
<
Body
>>
call
,
Response
<
List
<
Body
>>
response
)
{
allBodies
=
response
.
body
();
bodies
=
allBodies
;
updateAdapters
(
bodies
,
new
ArrayList
<
Event
>(),
new
ArrayList
<
User
>());
}
@Override
public
void
onFailure
(
Call
<
List
<
Body
>>
call
,
Throwable
t
)
{}
});
}
else
{
getView
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
GONE
);
}
// Search on text change in search
final
EditText
searchEditText
=
getView
().
findViewById
(
R
.
id
.
explore_search
);
searchEditText
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{}
@Override
public
void
afterTextChanged
(
Editable
s
)
{
if
(
searchEditText
.
getText
().
length
()
>=
3
)
{
doSearch
(
searchEditText
.
getText
().
toString
());
}
else
if
(
searchEditText
.
getText
().
length
()
==
0
)
{
bodies
=
allBodies
;
updateAdapters
(
bodies
,
new
ArrayList
<
Event
>(),
new
ArrayList
<
User
>());
}
}
});
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_explore
,
container
,
false
);
}
public
void
doSearch
(
String
query
)
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
// Show loading spinner
getView
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
VISIBLE
);
// Make request
RetrofitInterface
retrofitInterface
=
ServiceGenerator
.
createService
(
RetrofitInterface
.
class
);
retrofitInterface
.
search
(
sessionId
,
query
).
enqueue
(
new
Callback
<
ExploreResponse
>()
{
@Override
public
void
onResponse
(
Call
<
ExploreResponse
>
call
,
Response
<
ExploreResponse
>
response
)
{
// Get data
bodies
=
response
.
body
().
getBodies
();
events
=
response
.
body
().
getEvents
();
users
=
response
.
body
().
getUsers
();
updateAdapters
(
bodies
,
events
,
users
);
}
@Override
public
void
onFailure
(
Call
<
ExploreResponse
>
call
,
Throwable
t
)
{
// Request failed
}
});
}
private
void
updateAdapters
(
List
<
Body
>
bodies
,
List
<
Event
>
events
,
List
<
User
>
users
)
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
// Make spinner gone
getView
().
findViewById
(
R
.
id
.
loadingPanel
).
setVisibility
(
View
.
GONE
);
// Set adapters data
bodyAdapter
.
setBodyList
(
bodies
);
eventsAdapter
.
setPosts
(
events
);
userAdapter
.
setUserList
(
users
);
// Notify all adapters
bodyAdapter
.
notifyDataSetChanged
();
eventsAdapter
.
notifyDataSetChanged
();
userAdapter
.
notifyDataSetChanged
();
}
public
void
initRecyclerViews
()
{
if
(
getActivity
()
==
null
||
getView
()
==
null
)
return
;
// Bodies
RecyclerView
bodiesRecyclerView
=
getView
().
findViewById
(
R
.
id
.
explore_body_recycler_view
);
bodyAdapter
=
new
BodyAdapter
(
bodies
,
new
ItemClickListener
()
{
@Override
public
void
onItemClick
(
View
v
,
int
position
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
BODY_JSON
,
new
Gson
().
toJson
(
bodies
.
get
(
position
)));
updateFragment
(
new
BodyFragment
(),
bundle
);
}
});
bodiesRecyclerView
.
setAdapter
(
bodyAdapter
);
bodiesRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
// Events
RecyclerView
eventsRecyclerView
=
getView
().
findViewById
(
R
.
id
.
explore_event_recycler_view
);
eventsAdapter
=
new
FeedAdapter
(
events
,
new
ItemClickListener
()
{
@Override
public
void
onItemClick
(
View
v
,
int
position
)
{
Event
event
=
events
.
get
(
position
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
EVENT_JSON
,
new
Gson
().
toJson
(
event
));
updateFragment
(
new
EventFragment
(),
bundle
);
}
});
eventsRecyclerView
.
setAdapter
(
eventsAdapter
);
eventsRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
// Users
RecyclerView
usersRecyclerView
=
getView
().
findViewById
(
R
.
id
.
explore_user_recycler_view
);
userAdapter
=
new
UserAdapter
(
users
,
new
ItemClickListener
()
{
@Override
public
void
onItemClick
(
View
v
,
int
position
)
{
User
user
=
users
.
get
(
position
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
USER_ID
,
user
.
getUserID
());
updateFragment
(
new
ProfileFragment
(),
bundle
);
}
});
usersRecyclerView
.
setAdapter
(
userAdapter
);
usersRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
}
public
void
updateFragment
(
Fragment
fragment
,
Bundle
bundle
)
{
MainActivity
.
hideKeyboard
(
getActivity
());
fragment
.
setArguments
(
bundle
);
FragmentTransaction
ft
=
getActivity
().
getSupportFragmentManager
().
beginTransaction
();
ft
.
setCustomAnimations
(
R
.
anim
.
slide_in_left
,
R
.
anim
.
slide_out_left
,
R
.
anim
.
slide_in_right
,
R
.
anim
.
slide_out_right
);
ft
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
ft
.
addToBackStack
(
fragment
.
getTag
());
ft
.
commit
();
}
}
app/src/main/java/app/insti/fragment/MapFragment.java
View file @
fb6ce3a0
...
@@ -68,6 +68,7 @@ import java.util.List;
...
@@ -68,6 +68,7 @@ import java.util.List;
import
java.util.Locale
;
import
java.util.Locale
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
app.insti.MainActivity
;
import
app.insti.R
;
import
app.insti.R
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.RetrofitInterface
;
import
app.insti.api.ServiceGenerator
;
import
app.insti.api.ServiceGenerator
;
...
@@ -955,14 +956,7 @@ public class MapFragment extends Fragment implements TextWatcher,
...
@@ -955,14 +956,7 @@ public class MapFragment extends Fragment implements TextWatcher,
}
}
private
void
hideKeyboard
()
{
private
void
hideKeyboard
()
{
InputMethodManager
imm
=
(
InputMethodManager
)
getActivity
().
getSystemService
(
Activity
.
INPUT_METHOD_SERVICE
);
MainActivity
.
hideKeyboard
(
getActivity
());
//Find the currently focused view, so we can grab the correct window token from it.
View
view
=
getActivity
().
getCurrentFocus
();
//If no view currently has focus, create a new one, just so we can grab a window token from it
if
(
view
==
null
)
{
view
=
new
View
(
getActivity
());
}
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
}
}
@Override
@Override
...
...
app/src/main/res/drawable/ic_search_black_24dp.xml
0 → 100644
View file @
fb6ce3a0
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"
/>
</vector>
app/src/main/res/layout/fragment_explore.xml
0 → 100644
View file @
fb6ce3a0
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".fragment.ExploreFragment"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/explore_search"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"Search"
android:layout_marginLeft=
"6dp"
android:layout_marginRight=
"6dp"
android:layout_marginTop=
"3dp"
/>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/explore_body_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:nestedScrollingEnabled=
"false"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/explore_event_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:nestedScrollingEnabled=
"false"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/explore_user_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:nestedScrollingEnabled=
"false"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
<RelativeLayout
android:id=
"@+id/loadingPanel"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
<ProgressBar
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:indeterminate=
"true"
/>
</RelativeLayout>
</FrameLayout>
\ No newline at end of file
app/src/main/res/menu/activity_main_drawer.xml
View file @
fb6ce3a0
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
android:icon=
"@drawable/ic_event"
android:icon=
"@drawable/ic_event"
android:title=
"My Events"
/>
android:title=
"My Events"
/>
<item
android:id=
"@+id/nav_explore"
android:icon=
"@drawable/ic_search_black_24dp"
android:title=
"Explore"
/>
<item
<item
android:id=
"@+id/nav_mess_menu"
android:id=
"@+id/nav_mess_menu"
android:icon=
"@drawable/ic_restaurant_black_48dp"
android:icon=
"@drawable/ic_restaurant_black_48dp"
...
...
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