Skip to content
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

Related to himanshu-soni/ChatMessageView#21 (The default is right and… #22

Merged
merged 1 commit into from Apr 12, 2017

Conversation

lolobosse
Copy link
Contributor

… was not behaving as it should)

I guess that there was a bug because what I did was just to take to opposite of the left and it was working. Else right and long text wasn't working as mentioned in #21

@lolobosse
Copy link
Contributor Author

lolobosse commented Apr 12, 2017

@DaphnevanderVeeke If you look at the code completely you will see that the switch uses default for the "arrow right" case.

Then you can also see that the original "arrow right" case is very different from the "arrow left" case.

I mean it DIFFERENT (not the opposite like LEFT -> RIGHT).

What I did was to create the opposite of the left behaviour for the default of the switch.

Left was:

arrowRotation = 180;
arrowParams.addRule(ALIGN_PARENT_LEFT, TRUE);
arrowParams.setMargins(0, (int) arrowMargin, 0, (int) arrowMargin);
containerParams.addRule(RIGHT_OF, arrowImage.getId());

Whereas right was:

arrowRotation = 0;
containerParams.addRule(ALIGN_PARENT_LEFT, TRUE);
arrowParams.setMargins(0, (int) arrowMargin, 0, (int) arrowMargin);
arrowParams.addRule(RIGHT_OF, containerLayout.getId());

Which I replaced by the opposite of the original and working arrow-left case:

// Opposite of 180
arrowRotation = 0;
// Opposite of arrowParams.addRule(ALIGN_PARENT_LEFT, TRUE);
arrowParams.addRule(ALIGN_PARENT_RIGHT, TRUE);
// Margin should stay same
arrowParams.setMargins(0, (int) arrowMargin, 0, (int) arrowMargin);
// Opposite of arrowParams.addRule(RIGHT_OF, containerLayout.getId());
containerParams.addRule(LEFT_OF, arrowImage.getId());

@himanshu-soni Any plan to merge it soon?

@himanshu-soni himanshu-soni merged commit 3382ab5 into himanshu-soni:master Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants