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

PreferenceCategory use "iconSpaceReserved" not work #132

Open
tcqq opened this issue Dec 10, 2017 · 10 comments
Open

PreferenceCategory use "iconSpaceReserved" not work #132

tcqq opened this issue Dec 10, 2017 · 10 comments

Comments

@tcqq
Copy link

tcqq commented Dec 10, 2017

I tried using "iconSpaceReserved" into "PreferenceCategory", but it did not work.

How to create "PreferenceCategory with picture red box same effect?

image

https://material.io/guidelines/patterns/settings.html#settings-usage

@gregkorossy
Copy link
Owner

Yeah, it wouldn't work because the categories has no icons. I'll see if the padding can be implemented though.

@tcqq
Copy link
Author

tcqq commented Dec 11, 2017

Ok.

@tcqq
Copy link
Author

tcqq commented Apr 20, 2018

Hi, is this problem now supported?

@gregkorossy
Copy link
Owner

It is automatically supported by the support lib v28.0.0-alpha3 (and thus v28.0.0.0-alpha3 of this lib too).

@gregkorossy
Copy link
Owner

PreferenceCategory still does not support the iconSpaceReserved attribute properly. Reported the issue to Google: https://issuetracker.google.com/issues/111662669. This library will provide a temporary fix for the AndroidX version in the unreserved-way (meaning that icon space reservation won't be forced on smaller screen devices, thus, only the false value should be used, if needed at all).

@gregkorossy gregkorossy reopened this Jul 20, 2018
@gregkorossy
Copy link
Owner

The AndroidX version's v1.0.0-alpha2 contains the temporary fix.

@gregkorossy
Copy link
Owner

The reported issue says it was fixed, however, the official lib v1.0.0 still doesn't contain the fixes, so this lib keeps providing the bug fix.

@yccheok
Copy link

yccheok commented Oct 2, 2018

@Gericop Thanks for providing the fix. Currently, our app doesn't use AndroidX. But, we do use Android Architecture Component in the following way.

def lifecycle_version = "1.1.1"
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:$lifecycle_version"
// alternately - if using Java8, use the following instead of compiler
implementation "android.arch.lifecycle:common-java8:$lifecycle_version"


def room_version = "1.1.1"
implementation "android.arch.persistence.room:runtime:$room_version"
annotationProcessor "android.arch.persistence.room:compiler:$room_version"

def work_version = "1.0.0-alpha09"
implementation "android.arch.work:work-runtime:$work_version" // use -ktx for Kotlin
// optional - Firebase JobDispatcher support
implementation "android.arch.work:work-firebase:$work_version"

Your implementation 'com.takisoft.fix:preference-v7:28.0.0.0' works well for us except Google breaks app:iconSpaceReserved="false" in PreferenceCategory.

Is it suitable for us to use your The AndroidX version's v1.0.0-alpha2 for our case, or can the temporary fix on PreferenceCategory can be carry forward to v7:28.0.0.0?

Thank you very much.

@alihasan95
Copy link

How remove the padding from PreferenceCategory

@zhanghai
Copy link

Check out my answer on StackOverflow for overriding a <dimen> to fix this.

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

No branches or pull requests

5 participants