-
-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add app notifications to home screen #1760
Add app notifications to home screen #1760
Conversation
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="280dp" | ||
android:layout_height="90dp" | ||
android:background="@color/cardview_dark_background" |
Check warning
Code scanning / Android Lint
Overdraw: Painting regions more than once
override fun getOldListSize(): Int = data.size | ||
override fun getNewListSize(): Int = items.size | ||
|
||
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean = areContentsTheSame(oldItemPosition, newItemPosition) |
Check notice
Code scanning
Line detected, which is longer than the defined maximum line length in the code style.
override fun getNewListSize(): Int = items.size | ||
|
||
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean = areContentsTheSame(oldItemPosition, newItemPosition) | ||
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean = data[oldItemPosition] == items[newItemPosition] |
Check notice
Code scanning
Line detected, which is longer than the defined maximum line length in the code style.
update(notificationsRepository.notifications.value.isEmpty()) | ||
} | ||
|
||
override fun onItemClicked(itemViewHolder: Presenter.ViewHolder?, item: Any?, rowViewHolder: RowPresenter.ViewHolder?, row: Row?) { |
Check notice
Code scanning
Line detected, which is longer than the defined maximum line length in the code style.
I think this is a great idea! Should we maybe make it the full width of the screen? |
There can be multiple notifications, which would then show next to each other. Making it full width would look weird on a TV device. Open for suggestions though. |
Maybe use a bulleted list in a single full-width box for multiple? I don't know really... just trying to think of some conventions I have seen used before. That wouldn't really work if they are individually dismissable though. I'm sure it would be fine as is too. 😅 |
d2300e6
to
d852365
Compare
This one was on my list for a while now. Right now it implements a single message but some others I'm considering are:
Changes
Screenshots
Issues