Skip to content

Comments

Fix margin/gap inconsistency between 5.0 and pre-5.0#415

Open
chenxiaolong wants to merge 1 commit intogabrielemariotti:masterfrom
chenxiaolong:fix-gap
Open

Fix margin/gap inconsistency between 5.0 and pre-5.0#415
chenxiaolong wants to merge 1 commit intogabrielemariotti:masterfrom
chenxiaolong:fix-gap

Conversation

@chenxiaolong
Copy link

On pre-5.0, CardView (appcompat v7) adds a margin to draw the shadow. cardslib also adds a 6dp margin to the cards in ListViews and RecyclerViews, which results in large gaps between cards on pre-5.0 (see screenshots).

CardView has a card_view:cardUseCompatPadding attribute, which makes the 5.0 and pre-5.0 behavior match if set to true.

With this commit, ListView and RecyclerView now behave identically on <=4.4 and 5.0. (Also fixes shadows on the sides of cards on 5.0).

Platform Before After
4.4 ListView
4.4 RecyclerView
5.0 ListView
5.0 RecyclerView

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.

1 participant