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 is not working properly on Android M #50

Closed
h6ah4i opened this issue Jul 15, 2015 · 3 comments
Closed

Padding is not working properly on Android M #50

h6ah4i opened this issue Jul 15, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@h6ah4i
Copy link
Contributor

h6ah4i commented Jul 15, 2015

Hi. I noticed that android:padding setting for IconicsImageView is not working properly on Android M.

paddings are not applied propery

code (activity_playground.xml)

<com.mikepenz.iconics.view.IconicsImageView
    android:layout_width="72dp"
    android:layout_height="72dp"
    android:padding="24dp"
    app:iiv_icon="faw-android" />
@h6ah4i
Copy link
Contributor Author

h6ah4i commented Jul 15, 2015

I have just found a solution. Modify line 73 of IconicsImageView.java.
(maybe Android M has changed the behavior of MATRIX mode of scaling type)

From:

setScaleType(ScaleType.MATRIX);

To:

setScaleType(ScaleType.CENTER_INSIDE);

h6ah4i added a commit to h6ah4i/Android-Iconics that referenced this issue Jul 15, 2015
… M).

Change scaling type to use CENTER_INSIDE.
(Android M seems to have changed the behavior of MATRIX scaling type.)
@h6ah4i
Copy link
Contributor Author

h6ah4i commented Jul 15, 2015

See the PR #51.

@mikepenz
Copy link
Owner

@h6ah4i thanks. i'll check this later today

mikepenz added a commit that referenced this issue Jul 15, 2015
…orking_on_android_m

Fix the issue #50 (Padding is not working properly on Android M)
@mikepenz mikepenz self-assigned this Jul 15, 2015
@mikepenz mikepenz added the bug label Jul 15, 2015
@mikepenz mikepenz added this to the v1.3.0 milestone Jul 15, 2015
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