Skip to content
This repository was archived by the owner on Dec 1, 2017. It is now read-only.
This repository was archived by the owner on Dec 1, 2017. It is now read-only.

Potential Mistake ?  #3

@yrizk

Description

@yrizk

Hey lucas,

First off, thank you for this repo. this is an challenging, but worthwhile endeavor.
I was going through TweetElement.java , when I caught something odd with getMeasuredHeightWithMargins(UIElement uiElement) and getHeightWithMargins(UIElement) . For ease, I have attached the methods below:

 private int getHeightWithMargins(UIElement element) {
        final MarginLayoutParams lp = (MarginLayoutParams) element.getLayoutParams();
        return element.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;
    } 
   private int getMeasuredHeightWithMargins(UIElement element) {
        final MarginLayoutParams lp = (MarginLayoutParams) element.getLayoutParams();
        return element.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;
    }

As you can tell, there is no different between the two. I'm still learning, so I might be wrong, but do you mean to call element.getHeight() in the first method? If so let me know, I'd be happy to submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions