AndroidDeveloperLB / MaterialPreferenceLibrary

Allows to have an ActionBar on PreferenceActivity
Apache License 2.0
406 stars 69 forks source link

Breaks ConstraintLayout preview rendering in Android Studio #23

Closed jasongisstl closed 7 years ago

jasongisstl commented 7 years ago

If I add a dependency on this library to a project in Android Studio, it will prevent Android Studio's preview rendering of layouts using ConstraintLayout from working.

They do still seem to work fine at runtime, however.

Tested using Android Studio 2.3 Beta 1.

This can be seen with a brand new project.

At this point the layout preview will break.

AndroidDeveloperLB commented 7 years ago

I don't think It has anything to do with ConstraintLayout . The IDE cannot preview my preferences, just because they are customized. There is nothing I can do about it, except for reporting about it to Google, so this is what I did now: https://code.google.com/p/android/issues/detail?id=232320 Please star/comment about it, if you wish it to get more attention.

jasongisstl commented 7 years ago

Thank you very much for jumping on this so quickly!

I think this is a different issue. Apologies if I was too vague.

It is not that your custom preferences aren't shown in the preview, it is that including this library in a project (even if you do nothing with it) causes Android Studio to fail to preview ConstraintLayouts - it displays a (or several) 'No Such Field Error'(s).

Steps to reproduce:

androidstudiorenderissue
AndroidDeveloperLB commented 7 years ago

OK, I will need to check it out. Maybe I just need to update the libraries my library use (supoprt library stuff).

AndroidDeveloperLB commented 7 years ago

BTW, if you have minSdk set to 14 or above, you should consider using Google's solution: https://plus.google.com/+AndroidDevelopers/posts/9kZ3SsXdT2T Currently, it has the same issue of not animating the switchPreference, as I've got here. No idea why. I think it will solve your issue here, though.

AndroidDeveloperLB commented 7 years ago

I've succeeded reproducing this issue, but it says that it's a known issue: maxthonsnap20170119160126

AndroidDeveloperLB commented 7 years ago

Anyway, I've reported about this issue too: https://code.google.com/p/android/issues/detail?id=232553