-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Activity data dividers #4294
Activity data dividers #4294
Conversation
Hi @AlexNi245, first of all thank you for this PR, I tested it and it does what the description of the PR is saying but not what the issue #2216 requires, namely "sticky headers" which is a defined UI behavior meaning the actuall headers (kind of like section header) that have been in placce before need to be made "sticky" which means that while scrolling the actual header needs to stick at the top and will be pushed out be the next header when scrolling the list. In contrast while your PR displays the actual header at the top the list now lost all its headers! :( An examplpe would be https://github.com/bgogetap/StickyHeaders (see readme's animaed gif while this library unfortunately only supports Android v15+ (while Nextcloud supports 14+ so that won't work) |
Thank you for your feedback @AndyScherzinger. Obviously i got the issue wrong. I will change the behavior of the header like the way it behaves it the example that you mentioned. |
@AlexNi245 thanks for your great PR so far. |
Codecov Report
@@ Coverage Diff @@
## master #4294 +/- ##
============================================
- Coverage 16.61% 16.07% -0.54%
Complexity 1 1
============================================
Files 351 341 -10
Lines 31397 31145 -252
Branches 4446 4422 -24
============================================
- Hits 5216 5008 -208
+ Misses 25306 25272 -34
+ Partials 875 865 -10
|
Codecov Report
@@ Coverage Diff @@
## master #4294 +/- ##
===========================================
- Coverage 16.85% 16.76% -0.1%
Complexity 1 1
===========================================
Files 357 355 -2
Lines 31727 31577 -150
Branches 4482 4483 +1
===========================================
- Hits 5349 5294 -55
+ Misses 25483 25391 -92
+ Partials 895 892 -3
|
Unfortunately the build is broken due to a compile error /src/main/java/com/owncloud/android/ui/activities/ActivityHeaderPositioner.java:33: error: ';' expected |
Yes its still work in progress. I mention you when iam done. Is there a label or something to indicate that there is work in progress? |
Label "1. developing". |
@AlexNi245 can you change the alignment of the header back to their original state as in vertically aligned with the toolbar's title and the activity item text? That be great ❤️ |
IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/10326 |
@AndyScherzinger i reverted the branch to the previous version.I also merged the current master into it and create 3 classes related to the stickyHeaders feature. At the moment they have no affects and the app behaves like the version from the master branch. do you think it make sense to left the pr open for discussion, or should i open a new one as soon as the feature works correctly ? |
ae5de2e
to
f4bb53b
Compare
Any reason you closed the PR? |
@AlexNi245 Sorry I didn't see you question. Both would be fine actually. I kind of depends rather on when you want your work to be visibility, to have discussions and also get feedback from the CI job (code coverage, code analysis etc). |
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…as created according to the this implementation : https://stackoverflow.com/questions/32949971/how-can-i-make-sticky-headers-in-recyclerview-without-external-lib Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…to fix codeacy-bot issues Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…odel.Activity; Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
…coration, which is more generic Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Signed-off-by: alex <alex.plutta@googlemail.com> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
a6a8e6c
to
9624019
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/10524.apk |
Codacy286Lint
SpotBugs (new)
SpotBugs (master)
|
Yeah, merged for the upcoming release 🚀 Great work @AlexNi245 🎉 and thanks for taking care of this 🙏 |
That are great news. I'm glad that the feature made it to the upcoming release and it was fun to contribute to nextcloud android. I will search for some new issues at which i can work at. |
By the way if you have a good issue in mind please let me know maybe i can take it :) |
Always a pleasure to help :) As for the issues, anything from good first issue is probably fine and easy to implement. Other than that feel free to pick any issue you want to work on, we are around and happy to help 😊 |
b36067d Merge pull request #4294 from AlexNi245/#2216-activity-data-divers-design 9624019 activity header has now the same font size as a activity element fa11565 fixed issue Avoid reassigning parameters such as 'itemPosition' 5a3db5e replace do while loop in getHeaderPositionForItem with while loop 1dd2a5a change naming of Canvas c to Canvas canvas f4e964e change class name of ActivityListItemDecoration to StickyHeaderItemDecoration, which is more generic 52a7ffe add license text 6ffa9d0 remove duplicate entry of setContentView cdd5d38 add getHeaderPositionForItem unit test 0ac5a8b add static import for com.owncloud.android.lib.resources.activities.model.Activity; 4ea9667 unit test for isHeader(int pos) b61f9e0 format ActivityListAdapter 9012f43 set visibility from ActivityViewHeaderHolder back to protected 7a30070 remove unnecessary TAG field and replace nested if statement with && to fix codeacy-bot issues a26a895 apply changes to java doc c41dd38 optimize imports b4764f7 remove unnecessary files 792a6b9 finish implementation of sticky header implementation. This feature was created according to the this implementation : https://stackoverflow.com/questions/32949971/how-can-i-make-sticky-headers-in-recyclerview-without-external-lib 13e7aff increase height of header element and set backgroundcolor to white a184345 first implementation of sticky header logic. cd3d8dc start to implement sticky header behavior 259e106 Merge pull request #4355 from nextcloud/drawer caf1842 drawer: show only server address cb7d4a3 revert to old image (#4356) 7e44fec revert to old image f7c4eec Merge pull request #4345 from nextcloud/push a3fda5a no need to use owncloudClient 9a023c6 Check if app is excluded from battery optimization (#3589) 527c5db Use conscrypt (#4314) 6014e90 use conscrypt 5373660 Provide a banal 'paste' postmessage implementation. (#4189) 68cebf8 revert DeviceModule back to Kotlin 969ce78 Drone: update FindBugs results to reflect reduced error/warning count [skip ci] f26095f Merge pull request #4245 from fogninid/fixUploadListComparator e72a789 show on special vendors "disable power check" in auto upload menu - tint button - change logic when to show battery warning c8173c3 Use reloading on photo view (#2250) c38dcf3 Delete temp file on receive external files (#4349) c155edf Merge pull request #4347 from nextcloud/blacklistThumbnail a03ff84 daily dev 20190820
@AlexNi245 you could (in case you want to) work on adding a proper amount of whitespace to the bottom of each, last activity list item per group ( to have the proper whitespace per last group item to the next header item :) |
@AndyScherzinger @tobiasKaminsky
Resolves #2216
This PR belongs to the ActivitiesAction. The date string is now sticked to the top above the RecylerView, ts has the value of first visible item in the view.
The data string is now fully generated in the ActivitiesActivity and the ActivityListAdapter now only deals with Activities instead with Objects.
In my opinion it makes sense to change the signature of
ActivitiesContract.showActivities(List<Object> activities, OwnCloudClient client, String nextPageUrl)
to
ActivitiesContract.showActivities(List<Activities> activities, OwnCloudClient client, String nextPageUrl)
because no type casting is necessary anymore.Last but not least i added some white space around the headline.
I would appreciate any improvement proposal