• dgn's avatar
    [NTP Client][Reland]Adjust the card display depending on the screen width. · 605765aa
    dgn authored
    Original issue's description:
    > Changes the lines to go from always 2 to at most 2 by default, so that
    > we don't show empty lines on very large screens.
    > For smaller screens, the title can go up to 4 lines, and we then hide
    > the description.
    > On bigger screens, we add space on the side of the cards
    >
    > Measures used:
    > < 360dp: Narrow -> 4 lines title
    > >= 360dp: Regular -> 2 + 2 lines
    > >= 600dp: Wide -> 2 + 2 lines, 48dp gutters around the cards
    >
    > Preview: https://goo.gl/photos/prJ42tvP4jzwiCn3A
    
    Was reverted as https://codereview.chromium.org/2167973004/
    
    Reason for revert:
    > Broke Android compile:
    > NewTabPageAdapterTest.java:162: error: constructor NewTabPageAdapter in
    >   class NewTabPageAdapter cannot be applied to given types;
    >   NewTabPageAdapter ntpa = new NewTabPageAdapter(mNewTabPageManager, null, mSnippetsBridge);
    >                                  ^
    >   required: NewTabPageManager,NewTabPageLayout,SnippetsBridge,UiConfig
    >   found: NewTabPageManager,<null>,SnippetsBridge
    >   reason: actual and formal argument lists differ in length
    
    TBR=bauerb@chromium.org,mvanouwerkerk@chromium.org,peconn@chromium.org,dbeam@chromium.org
    # Skipping CQ checks because original CL landed less than 1 days ago.
    BUG=625628, 624333
    
    Review-Url: https://codereview.chromium.org/2173723002
    Cr-Commit-Position: refs/heads/master@{#407121}
    605765aa
dimens.xml 19.1 KB