Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PreferenceGroupAdapter can only be accessed from within the same library group

Tags:

java

android

I am trying to use the PreferenceGroupAdapter adapter on my FragmentPreferenceCompat without luck. I am using the the code from the following thread:

https://stackoverflow.com/a/51832736

I get the message:

PreferenceGroupAdapter can only be accessed from within the same library group

Am I right to assume that this class was available at some point and they have decided to restrict it for internal use at a later stage? If that is the case, is there any way to access/iterate over the viewholders to perform a specific task.

Regards.

like image 939
Kaleega Avatar asked Oct 17 '25 16:10

Kaleega


1 Answers

I think the class had restricted methods before.

@SuppressLint("RestrictedApi") above the class fixes that for me.

like image 52
Fossor Avatar answered Oct 20 '25 05:10

Fossor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!