-
Notifications
You must be signed in to change notification settings - Fork 244
Issue#344 Snackbar added for user awareness resolved #358
base: master
Are you sure you want to change the base?
Issue#344 Snackbar added for user awareness resolved #358
Conversation
Automated message from Dropbox CLA bot @harshitagupta30, it looks like you've already signed the Dropbox CLA. Thanks! |
didn't notice that! Yeah, I'll fix this. |
Hi @kunall17! the best solution to this problem I could find is to hide the fab whenever snackbar appears and as soon as snackbar disappears fab will appear which doesn't overlap at all and looks good! |
How about using the animations which are currently being used rather than this fading? |
I didn't get your point. Can you please point out where its been used? |
@kunall17 I earlier tried to use these animations but they resulted into unusual behaviour of the fab! Sometimes it appears and sometimes it doesn't! It also happened that it was slightly visible at the bottom but not complete. That is why I opted out for adding the new behavior. |
Weird this method is being used at many places for animation hiding and stuff Any possibility for sliding this FAB out? |
@kunall17 According to the documentation everywhere whenever we have snackbar along with the fab in coordinator layout then when the snackbar appears the fab will itself move up and tried that approach but not got that result. Then use the animation which was resulting into the fab being half hidden and half visible and then I came out with this i.e. hiding the whenever the snackbar pops out. |
@harshitagupta30 yeah it would have if we were using the default behavior of the fab and the coordinator layouts! |
@kunall17 Can you please review this and finalise the changes in this PR so that this issue can be resolved? |
|
||
import java.util.List; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this author details, the git history has the author details!
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | ||
super.onViewCreated(view, savedInstanceState); | ||
CoordinatorLayout coordinatorLayout = (CoordinatorLayout) getActivity().findViewById(R.id.coordinatorLayout); | ||
snackbar = Snackbar.make(coordinatorLayout,R.string.no_new_messages,Snackbar.LENGTH_SHORT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format the whole code (ctrl + alt + L)
This is still overlapping because i think your behaviour is not being used now, because behaviour is set here by java https://github.com/zulip/zulip-android/blob/master/app/src/main/java/com/zulip/android/activities/ZulipActivity.java#L1674 |
Hi @kunall17! I've made the changes as told by you and yes that behavior was not working! I've added the required code and I guess its working fine now! Can you please review it? :) |
@harshitagupta30 Thanks for your pull request, and thanks for writing a descriptive commit message. Here's a guide to help you write commit messages that are more consistent with our style, which makes it easier for us in the future -- when someone's trying to solve a new problem, if commit messages are all in the same format, it's easier to skim them in logs and quickly understand what's happening. Here are some tips on tidying your commit history, including changing your commit messages. And when you update your code or your commit message, you can still of course update your pull request and the changes will appear here. :) Thanks! |
@kunall17 Can you please review it? 👍 |
This removes the sync b/w removing toolbar and FAB which was there before, and sometimes the FAB automatically starts fading (tried on emulator don't know about a physical device) You should not remove the old Behaviour which was being used, edit the current behaviour i found some good article which might help you achieving this https://www.bignerdranch.com/blog/customizing-coordinatorlayouts-behavior/ Otherwise the PR is good for a merge! 👍 |
@kunall17 I am referring to the same article! I tried to apply the same thing here :D But alas it's not working here! |
What changes you tried to make to things working on the old behaviour file? |
I added these 2 lines in
after you said that the behavior is not set. |
No, i'm talking about changes in https://github.com/zulip/zulip-android/blob/master/app/src/main/java/com/zulip/android/util/RemoveViewsOnScroll.java |
I've made no changes in this file instead I've added a new class ShrinkBehaviorOfFab and point the fab behavior to this class |
So creating a new behaviour removes the old behaviour as well, which are to supported now as well, so you need to edit the old behaviour! |
No, I haven't changed the old behavior. |
So that's what I'm saying so far you need to edit this file https://github.com/zulip/zulip-android/blob/master/app/src/main/java/com/zulip/android/util/RemoveViewsOnScroll.java use conditions and sync up with the snackbar/coordinator layout! |
I guess the issue may be caused because of using two behaviors coz in |
Yeah I got it know! I'll make those changes and update the PR. One more thing instead of updating |
Your work will increase way more then, It would be better to have the RemoveViewsOnScroll! |
Hi @kunall17! I tried to merge the changes in |
@kunall17 Can you please review it? 👍 |
@harshitagupta30 |
@kunall17 Any suggestions to make it sync again? :) |
Yeah use the same behaviour in both AppBarLayout and FAB! |
@harshitagupta30, your pull request has developed a merge conflict! Please review the most recent commit (f791888) for conflicting changes and resolve your pull request's merge conflicts. |
Fixes issue #344
@kunall17 Please review!