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
73569367
Commit
73569367
authored
Jul 15, 2017
by
Sajal Narang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement Notifications API
parent
d61135c1
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
342 additions
and
6 deletions
+342
-6
app/build.gradle
app/build.gradle
+1
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/Constants.java
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/Constants.java
+5
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/MainActivity.java
...c/main/java/in/ac/iitb/gymkhana/iitbapp/MainActivity.java
+41
-2
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/adapter/NotificationsAdapter.java
...c/iitb/gymkhana/iitbapp/adapter/NotificationsAdapter.java
+62
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/RetrofitInterface.java
...va/in/ac/iitb/gymkhana/iitbapp/api/RetrofitInterface.java
+6
-3
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/model/AppNotification.java
...n/ac/iitb/gymkhana/iitbapp/api/model/AppNotification.java
+75
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/model/NotificationsRequest.java
...iitb/gymkhana/iitbapp/api/model/NotificationsRequest.java
+27
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/model/NotificationsResponse.java
...itb/gymkhana/iitbapp/api/model/NotificationsResponse.java
+29
-0
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragment/FeedFragment.java
...va/in/ac/iitb/gymkhana/iitbapp/fragment/FeedFragment.java
+1
-1
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragment/NotificationsFragment.java
...iitb/gymkhana/iitbapp/fragment/NotificationsFragment.java
+64
-0
app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png
...rc/main/res/drawable-hdpi/ic_notifications_black_24dp.png
+0
-0
app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png
...rc/main/res/drawable-mdpi/ic_notifications_black_24dp.png
+0
-0
app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png
...c/main/res/drawable-xhdpi/ic_notifications_black_24dp.png
+0
-0
app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png
.../main/res/drawable-xxhdpi/ic_notifications_black_24dp.png
+0
-0
app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png
...main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png
+0
-0
app/src/main/res/layout/fragment_notifications.xml
app/src/main/res/layout/fragment_notifications.xml
+12
-0
app/src/main/res/layout/notification.xml
app/src/main/res/layout/notification.xml
+12
-0
app/src/main/res/menu/main.xml
app/src/main/res/menu/main.xml
+7
-0
No files found.
app/build.gradle
View file @
73569367
...
@@ -51,5 +51,6 @@ dependencies {
...
@@ -51,5 +51,6 @@ dependencies {
compile
"com.squareup.okhttp3:okhttp:${okhttpVersion}"
compile
"com.squareup.okhttp3:okhttp:${okhttpVersion}"
compile
"com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
compile
"com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
compile
"com.squareup.picasso:picasso:${picassoVersion}"
compile
"com.squareup.picasso:picasso:${picassoVersion}"
implementation
'com.android.support:support-v4:25.4.0'
}
}
apply
plugin:
'com.google.gms.google-services'
apply
plugin:
'com.google.gms.google-services'
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/Constants.java
0 → 100644
View file @
73569367
package
in.ac.iitb.gymkhana.iitbapp
;
public
class
Constants
{
public
static
final
String
NOTIFICATIONS_RESPONSE_JSON
=
"notifications_json"
;
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/MainActivity.java
View file @
73569367
...
@@ -18,6 +18,15 @@ import android.view.Menu;
...
@@ -18,6 +18,15 @@ import android.view.Menu;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
com.google.gson.Gson
;
import
java.util.List
;
import
in.ac.iitb.gymkhana.iitbapp.api.RetrofitInterface
;
import
in.ac.iitb.gymkhana.iitbapp.api.ServiceGenerator
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.AppNotification
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NotificationsRequest
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NotificationsResponse
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.AboutFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.AboutFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.CMSFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.CMSFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.CalendarFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.CalendarFragment
;
...
@@ -27,8 +36,12 @@ import in.ac.iitb.gymkhana.iitbapp.fragment.GCRankingsFragment;
...
@@ -27,8 +36,12 @@ import in.ac.iitb.gymkhana.iitbapp.fragment.GCRankingsFragment;
import
in.ac.iitb.gymkhana.iitbapp.fragment.MapFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.MapFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.MessMenuFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.MessMenuFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.MyEventsFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.MyEventsFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.NotificationsFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.PTCellFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.PTCellFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.TimetableFragment
;
import
in.ac.iitb.gymkhana.iitbapp.fragment.TimetableFragment
;
import
retrofit2.Call
;
import
retrofit2.Callback
;
import
retrofit2.Response
;
public
class
MainActivity
extends
AppCompatActivity
public
class
MainActivity
extends
AppCompatActivity
...
@@ -57,7 +70,33 @@ public class MainActivity extends AppCompatActivity
...
@@ -57,7 +70,33 @@ public class MainActivity extends AppCompatActivity
NavigationView
navigationView
=
(
NavigationView
)
findViewById
(
R
.
id
.
nav_view
);
NavigationView
navigationView
=
(
NavigationView
)
findViewById
(
R
.
id
.
nav_view
);
navigationView
.
setNavigationItemSelectedListener
(
this
);
navigationView
.
setNavigationItemSelectedListener
(
this
);
fetchNotifications
();
}
private
void
fetchNotifications
()
{
NotificationsRequest
notificationsRequest
=
new
NotificationsRequest
(
0
,
20
);
RetrofitInterface
retrofitInterface
=
ServiceGenerator
.
createService
(
RetrofitInterface
.
class
);
retrofitInterface
.
getNotifications
(
notificationsRequest
).
enqueue
(
new
Callback
<
NotificationsResponse
>()
{
@Override
public
void
onResponse
(
Call
<
NotificationsResponse
>
call
,
Response
<
NotificationsResponse
>
response
)
{
if
(
response
.
isSuccessful
())
{
NotificationsResponse
notificationsResponse
=
response
.
body
();
String
notificationsResponseJson
=
new
Gson
().
toJson
(
notificationsResponse
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
NOTIFICATIONS_RESPONSE_JSON
,
notificationsResponseJson
);
NotificationsFragment
notificationsFragment
=
new
NotificationsFragment
();
notificationsFragment
.
setArguments
(
bundle
);
updateFragment
(
notificationsFragment
);
}
//Server Error
}
@Override
public
void
onFailure
(
Call
<
NotificationsResponse
>
call
,
Throwable
t
)
{
//Network Error
}
});
}
}
@Override
@Override
...
@@ -164,8 +203,8 @@ public class MainActivity extends AppCompatActivity
...
@@ -164,8 +203,8 @@ public class MainActivity extends AppCompatActivity
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
transaction
.
replace
(
R
.
id
.
framelayout_for_fragment
,
fragment
,
fragment
.
getTag
());
transaction
.
commit
();
transaction
.
commit
();
}
}
public
void
onRequestPermissionsResult
(
int
requestCode
,
public
void
onRequestPermissionsResult
(
int
requestCode
,
String
[]
permissions
,
String
[]
permissions
,
int
[]
grantResults
)
{
int
[]
grantResults
)
{
if
(
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
if
(
grantResults
[
0
]
==
PackageManager
.
PERMISSION_GRANTED
)
{
...
...
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/adapter/NotificationsAdapter.java
0 → 100644
View file @
73569367
package
in.ac.iitb.gymkhana.iitbapp.adapter
;
import
android.content.Context
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
java.util.List
;
import
in.ac.iitb.gymkhana.iitbapp.ItemClickListener
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.AppNotification
;
public
class
NotificationsAdapter
extends
RecyclerView
.
Adapter
<
NotificationsAdapter
.
Viewholder
>
{
private
List
<
AppNotification
>
notifications
;
private
Context
context
;
private
ItemClickListener
itemClickListener
;
public
NotificationsAdapter
(
List
<
AppNotification
>
notifications
,
ItemClickListener
itemClickListener
)
{
this
.
notifications
=
notifications
;
this
.
itemClickListener
=
itemClickListener
;
}
@Override
public
Viewholder
onCreateViewHolder
(
ViewGroup
viewGroup
,
int
i
)
{
context
=
viewGroup
.
getContext
();
LayoutInflater
inflater
=
LayoutInflater
.
from
(
context
);
View
notificationView
=
inflater
.
inflate
(
R
.
layout
.
notification
,
viewGroup
,
false
);
final
Viewholder
notificationsViewHolder
=
new
Viewholder
(
notificationView
);
notificationView
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
itemClickListener
.
onItemClick
(
v
,
notificationsViewHolder
.
getAdapterPosition
());
}
});
return
notificationsViewHolder
;
}
@Override
public
void
onBindViewHolder
(
Viewholder
viewholder
,
int
i
)
{
AppNotification
appNotification
=
notifications
.
get
(
i
);
viewholder
.
notificationTitle
.
setText
(
appNotification
.
getNotificationName
());
}
@Override
public
int
getItemCount
()
{
return
notifications
.
size
();
}
public
class
Viewholder
extends
RecyclerView
.
ViewHolder
{
private
TextView
notificationTitle
;
public
Viewholder
(
View
itemView
)
{
super
(
itemView
);
notificationTitle
=
(
TextView
)
itemView
.
findViewById
(
R
.
id
.
notification_title
);
}
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/RetrofitInterface.java
View file @
73569367
...
@@ -4,16 +4,19 @@ import in.ac.iitb.gymkhana.iitbapp.api.model.LoginRequest;
...
@@ -4,16 +4,19 @@ import in.ac.iitb.gymkhana.iitbapp.api.model.LoginRequest;
import
in.ac.iitb.gymkhana.iitbapp.api.model.LoginResponse
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.LoginResponse
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NewsFeedRequest
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NewsFeedRequest
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NewsFeedResponse
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NewsFeedResponse
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NotificationsRequest
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NotificationsResponse
;
import
retrofit2.Call
;
import
retrofit2.Call
;
import
retrofit2.http.Body
;
import
retrofit2.http.Body
;
import
retrofit2.http.GET
;
import
retrofit2.http.POST
;
import
retrofit2.http.POST
;
import
retrofit2.http.PUT
;
public
interface
RetrofitInterface
{
public
interface
RetrofitInterface
{
@POST
(
"login/"
)
@POST
(
"login/"
)
Call
<
LoginResponse
>
login
(
@Body
LoginRequest
loginRequest
);
Call
<
LoginResponse
>
login
(
@Body
LoginRequest
loginRequest
);
@
GE
T
(
"getNewsFeed/"
)
@
POS
T
(
"getNewsFeed/"
)
Call
<
NewsFeedResponse
>
getNewsFeed
(
@Body
NewsFeedRequest
newsFeedRequest
);
Call
<
NewsFeedResponse
>
getNewsFeed
(
@Body
NewsFeedRequest
newsFeedRequest
);
@POST
(
"getNotifications/"
)
Call
<
NotificationsResponse
>
getNotifications
(
@Body
NotificationsRequest
notificationsRequest
);
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/model/AppNotification.java
0 → 100644
View file @
73569367
package
in.ac.iitb.gymkhana.iitbapp.api.model
;
import
com.google.gson.annotations.SerializedName
;
public
class
AppNotification
{
@SerializedName
(
"notification_type"
)
private
int
notificationType
;
@SerializedName
(
"notification_id"
)
private
String
notificationId
;
@SerializedName
(
"notification_related_id"
)
private
String
notificationRelatedId
;
@SerializedName
(
"notification_name"
)
private
String
notificationName
;
@SerializedName
(
"notification_description"
)
private
String
notificationDescription
;
@SerializedName
(
"notification_image"
)
private
String
notificationImage
;
public
AppNotification
(
int
notificationType
,
String
notificationId
,
String
notificationRelatedId
,
String
notificationName
,
String
notificationDescription
,
String
notificationImage
)
{
this
.
notificationType
=
notificationType
;
this
.
notificationId
=
notificationId
;
this
.
notificationRelatedId
=
notificationRelatedId
;
this
.
notificationName
=
notificationName
;
this
.
notificationDescription
=
notificationDescription
;
this
.
notificationImage
=
notificationImage
;
}
public
int
getNotificationType
()
{
return
notificationType
;
}
public
void
setNotificationType
(
int
notificationType
)
{
this
.
notificationType
=
notificationType
;
}
public
String
getNotificationId
()
{
return
notificationId
;
}
public
void
setNotificationId
(
String
notificationId
)
{
this
.
notificationId
=
notificationId
;
}
public
String
getNotificationRelatedId
()
{
return
notificationRelatedId
;
}
public
void
setNotificationRelatedId
(
String
notificationRelatedId
)
{
this
.
notificationRelatedId
=
notificationRelatedId
;
}
public
String
getNotificationName
()
{
return
notificationName
;
}
public
void
setNotificationName
(
String
notificationName
)
{
this
.
notificationName
=
notificationName
;
}
public
String
getNotificationDescription
()
{
return
notificationDescription
;
}
public
void
setNotificationDescription
(
String
notificationDescription
)
{
this
.
notificationDescription
=
notificationDescription
;
}
public
String
getNotificationImage
()
{
return
notificationImage
;
}
public
void
setNotificationImage
(
String
notificationImage
)
{
this
.
notificationImage
=
notificationImage
;
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/model/NotificationsRequest.java
0 → 100644
View file @
73569367
package
in.ac.iitb.gymkhana.iitbapp.api.model
;
public
class
NotificationsRequest
{
private
int
from
;
private
int
to
;
public
NotificationsRequest
(
int
from
,
int
to
)
{
this
.
from
=
from
;
this
.
to
=
to
;
}
public
int
getFrom
()
{
return
from
;
}
public
void
setFrom
(
int
from
)
{
this
.
from
=
from
;
}
public
int
getTo
()
{
return
to
;
}
public
void
setTo
(
int
to
)
{
this
.
to
=
to
;
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/api/model/NotificationsResponse.java
0 → 100644
View file @
73569367
package
in.ac.iitb.gymkhana.iitbapp.api.model
;
import
java.util.List
;
public
class
NotificationsResponse
{
private
String
result
;
private
List
<
AppNotification
>
notifications
;
public
NotificationsResponse
(
String
result
,
List
<
AppNotification
>
notifications
)
{
this
.
result
=
result
;
this
.
notifications
=
notifications
;
}
public
String
getResult
()
{
return
result
;
}
public
void
setResult
(
String
result
)
{
this
.
result
=
result
;
}
public
List
<
AppNotification
>
getNotifications
()
{
return
notifications
;
}
public
void
setNotifications
(
List
<
AppNotification
>
notifications
)
{
this
.
notifications
=
notifications
;
}
}
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragment/FeedFragment.java
View file @
73569367
...
@@ -48,7 +48,7 @@ public class FeedFragment extends Fragment {
...
@@ -48,7 +48,7 @@ public class FeedFragment extends Fragment {
NewsFeedRequest
newsFeedRequest
=
new
NewsFeedRequest
(
NewsFeedRequest
.
FOLLOWED
,
0
,
20
);
NewsFeedRequest
newsFeedRequest
=
new
NewsFeedRequest
(
NewsFeedRequest
.
FOLLOWED
,
0
,
20
);
RetrofitInterface
retrofitInterface
=
ServiceGenerator
.
createService
(
RetrofitInterface
.
class
);
RetrofitInterface
retrofitInterface
=
ServiceGenerator
.
createService
(
RetrofitInterface
.
class
);
retrofitInterface
.
getNewsFeed
().
enqueue
(
new
Callback
<
NewsFeedResponse
>()
{
retrofitInterface
.
getNewsFeed
(
newsFeedRequest
).
enqueue
(
new
Callback
<
NewsFeedResponse
>()
{
@Override
@Override
public
void
onResponse
(
Call
<
NewsFeedResponse
>
call
,
Response
<
NewsFeedResponse
>
response
)
{
public
void
onResponse
(
Call
<
NewsFeedResponse
>
call
,
Response
<
NewsFeedResponse
>
response
)
{
if
(
response
.
isSuccessful
())
{
if
(
response
.
isSuccessful
())
{
...
...
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragment/NotificationsFragment.java
0 → 100644
View file @
73569367
package
in.ac.iitb.gymkhana.iitbapp.fragment
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.google.gson.Gson
;
import
java.util.List
;
import
in.ac.iitb.gymkhana.iitbapp.Constants
;
import
in.ac.iitb.gymkhana.iitbapp.ItemClickListener
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
import
in.ac.iitb.gymkhana.iitbapp.adapter.NotificationsAdapter
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.AppNotification
;
import
in.ac.iitb.gymkhana.iitbapp.api.model.NotificationsResponse
;
/**
* A simple {@link Fragment} subclass.
*/
public
class
NotificationsFragment
extends
Fragment
{
RecyclerView
notificationsRecyclerView
;
public
NotificationsFragment
()
{
// Required empty public constructor
}
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
return
inflater
.
inflate
(
R
.
layout
.
fragment_notifications
,
container
,
false
);
}
@Override
public
void
onStart
()
{
super
.
onStart
();
Bundle
bundle
=
getArguments
();
String
notificationsResponseJson
=
bundle
.
getString
(
Constants
.
NOTIFICATIONS_RESPONSE_JSON
);
NotificationsResponse
notificationsResponse
=
new
Gson
().
fromJson
(
notificationsResponseJson
,
NotificationsResponse
.
class
);
showNotifications
(
notificationsResponse
);
}
private
void
showNotifications
(
NotificationsResponse
notificationsResponse
)
{
List
<
AppNotification
>
notifications
=
notificationsResponse
.
getNotifications
();
NotificationsAdapter
notificationsAdapter
=
new
NotificationsAdapter
(
notifications
,
new
ItemClickListener
()
{
@Override
public
void
onItemClick
(
View
v
,
int
position
)
{
//TODO: What to do?
}
});
notificationsRecyclerView
=
(
RecyclerView
)
getActivity
().
findViewById
(
R
.
id
.
notifications_recycler_view
);
notificationsRecyclerView
.
setAdapter
(
notificationsAdapter
);
notificationsRecyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
()));
}
}
app/src/main/res/drawable-hdpi/ic_notifications_black_24dp.png
0 → 100644
View file @
73569367
236 Bytes
app/src/main/res/drawable-mdpi/ic_notifications_black_24dp.png
0 → 100644
View file @
73569367
179 Bytes
app/src/main/res/drawable-xhdpi/ic_notifications_black_24dp.png
0 → 100644
View file @
73569367
272 Bytes
app/src/main/res/drawable-xxhdpi/ic_notifications_black_24dp.png
0 → 100644
View file @
73569367
381 Bytes
app/src/main/res/drawable-xxxhdpi/ic_notifications_black_24dp.png
0 → 100644
View file @
73569367
493 Bytes
app/src/main/res/layout/fragment_notifications.xml
0 → 100644
View file @
73569367
<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=
"in.ac.iitb.gymkhana.iitbapp.fragment.NotificationsFragment"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/notifications_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</FrameLayout>
app/src/main/res/layout/notification.xml
0 → 100644
View file @
73569367
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/notification_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/menu/main.xml
View file @
73569367
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
<menu
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"
>
<item
android:id=
"@+id/action_notifications"
android:orderInCategory=
"1"
android:icon=
"@drawable/ic_notifications_black_24dp"
android:title=
"Notifications"
app:showAsAction=
"always"
/>
<item
<item
android:id=
"@+id/action_settings"
android:id=
"@+id/action_settings"
android:orderInCategory=
"100"
android:orderInCategory=
"100"
...
...
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