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

Padding problems #25

Open
ivanfeli opened this issue Jun 14, 2016 · 0 comments
Open

Padding problems #25

ivanfeli opened this issue Jun 14, 2016 · 0 comments
Labels

Comments

@ivanfeli
Copy link
Contributor

With an xml like this:

android:paddingBottom="8dp"
android:paddingEnd="12dp"
android:paddingStart="12dp"
android:paddingTop="8dp"

results in the code:

leaderboard_item_player_rating.setPadding(0,LayoutUtils.convertDpToPixel(8f, getContext()),0,LayoutUtils.convertDpToPixel(8f, getContext()));
leaderboard_item_player_rating.setPaddingRelative(LayoutUtils.convertDpToPixel(12f, getContext()),LayoutUtils.convertDpToPixel(8f, getContext()),0,0);

paddingEnd seems to be missing, and the paddingBottom too (in the relative call).

If you look at the TextView class, both methods call the super.setPadding*(..); which then sets the same fields, so I think only the relative one should be called (but it will not support below API 19)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants