Android-Support-Preference-V7-Fix icon indicating copy to clipboard operation
Android-Support-Preference-V7-Fix copied to clipboard

PreferenceCategory use "iconSpaceReserved" not work

Open tcqq opened this issue 6 years ago • 10 comments

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

tcqq avatar Dec 10 '17 08:12 tcqq

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

gregkorossy avatar Dec 10 '17 12:12 gregkorossy

Ok.

tcqq avatar Dec 11 '17 10:12 tcqq

Hi, is this problem now supported?

tcqq avatar Apr 20 '18 21:04 tcqq

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

gregkorossy avatar Jul 18 '18 00:07 gregkorossy

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 avatar Jul 20 '18 11:07 gregkorossy

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

gregkorossy avatar Jul 20 '18 12:07 gregkorossy

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.

gregkorossy avatar Sep 25 '18 10:09 gregkorossy

@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.

yccheok avatar Oct 02 '18 16:10 yccheok

How remove the padding from PreferenceCategory

alihasan95 avatar Oct 09 '18 14:10 alihasan95

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

zhanghai avatar Oct 24 '18 03:10 zhanghai