Obsolete
Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #3
@2 This belongs to Android-X, which has PreferenceFragmentCompat, which still can't be used, and won't be used when you create a new settingsActivity through the wizard, even if your gradle file has Android-X being used:
https://issuetracker.google.com/issues/111408342
The IDE can't even identify PreferenceFragmentCompat.
And, when I go to the newly created Settings Activity, and choose to migrate it to Android-X, it says all is fine, even though it's not:
https://developer.android.com/topic/libraries/support-library/refactor
So, for now, what you wrote isn't available to the public.
The IDE can't even identify PreferenceFragmentCompat.
And, when I go to the newly created Settings Activity, and choose to migrate it to Android-X, it says all is fine, even though it's not:
So, for now, what you wrote isn't available to the public.
ad...@google.com <ad...@google.com>
ad...@google.com <ad...@google.com> #4
We have passed this to the development team and will update this issue with more information as it becomes available.
lp...@google.com <lp...@google.com> #5
Hi,
PreferenceFragmentCompat is publicly available and we would recommend using it to use preferences in your application - is there anything in particular preventing you from using it?
The wizard and documentation hasn't been updated yet to recommend this, but it is on the roadmap.
You can see our public sample app (https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/samples/SupportPreferenceDemos/ ) for an example of how to use PreferenceFragmentCompat - and improvements to the sample app are upcoming as well.
PreferenceFragmentCompat is publicly available and we would recommend using it to use preferences in your application - is there anything in particular preventing you from using it?
The wizard and documentation hasn't been updated yet to recommend this, but it is on the roadmap.
You can see our public sample app (
lb...@gmail.com <lb...@gmail.com> #6
@5 Yes, I can't use it, because there are no docs about it, and it's not published yet on any website, no tutorial, and the IDE doesn't even create it by default.
Even the link you've provided me here doesn't work (it has build errors - attached screenshot), and I have the latest of the latest Android studio version, with all the latest goodies in it:
Android Studio 3.3 Canary 3
Build #AI-181.5281.24.33.4884283, built on July 10, 2018
JRE: 1.8.0_152-release-1136-b04 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
So however your recommendation is, you should apply it "on the field", and not just write it here to me.
Even the link you've provided me here doesn't work (it has build errors - attached screenshot), and I have the latest of the latest Android studio version, with all the latest goodies in it:
Android Studio 3.3 Canary 3
Build #AI-181.5281.24.33.4884283, built on July 10, 2018
JRE: 1.8.0_152-release-1136-b04 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
So however your recommendation is, you should apply it "on the field", and not just write it here to me.
lp...@google.com <lp...@google.com> #7
In order run to the app you will need to get the whole source tree (as it contains plugins and configuration needed to run) - check here for more detail https://android.googlesource.com/platform/frameworks/support/
We understand that documentation isn't in a healthy state right now, but work is ongoing to update existing documentation and add new documentation for this.
As mentioned in #2 setVisible() would work for you if you decide to use PreferenceFragmentCompat.
Since this feature already exists, closing this bug due to no further action.
We understand that documentation isn't in a healthy state right now, but work is ongoing to update existing documentation and add new documentation for this.
As mentioned in #2 setVisible() would work for you if you decide to use PreferenceFragmentCompat.
Since this feature already exists, closing this bug due to no further action.
lb...@gmail.com <lb...@gmail.com> #8
I don't understand how to get the whole source tree to compile well . What kind of sample needs a huge amount of code to be built... Why does it need exactly?
If it's all available, it should be enough to have the needed lines in gradle files, just like all previous versions of the support library and its components.
To me this doesn't exist anymore, and I'm sure all other developers out there don't use it yet, and aren't even aware of it.
To all of us, all we see is deprecated classes being used, without an alternative.
If it's all available, it should be enough to have the needed lines in gradle files, just like all previous versions of the support library and its components.
To me this doesn't exist anymore, and I'm sure all other developers out there don't use it yet, and aren't even aware of it.
To all of us, all we see is deprecated classes being used, without an alternative.
lp...@google.com <lp...@google.com> #9
These samples use the source code instead of prebuilts, so any changes you make to the libraries will also be reflected in the sample applications - allowing verification of changes to the library for contributors.
If you would only like to see an example implementation of PreferenceFragmentCompat, this is the relevant Activity -https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/samples/SupportPreferenceDemos/src/main/java/com/example/android/supportpreference/FragmentSupportPreferencesCompat.java
And then you can use this XMl file -https://android.googlesource.com/platform/frameworks/support/+/androidx-master-dev/samples/SupportPreferenceDemos/src/main/res/xml/preferences.xml to see some of the different types and attributes of preferences.
You can just demonstrate this in a new project without needing the whole source tree.
If you would only like to see an example implementation of PreferenceFragmentCompat, this is the relevant Activity -
And then you can use this XMl file -
You can just demonstrate this in a new project without needing the whole source tree.
lb...@gmail.com <lb...@gmail.com> #10
@9 Took me some time, but I got it to work.
Is "onPreferenceStartScreen" new ? I never used such a thing...
It seems it allow to have multiple screens declared on the same XML file. Seems it lacks the transition between the fragments in the code there.
And why do "DropDownPreference" and "SeekBarPreference" get a warning that they aren't allowed there, even though they (or at least SeekBarPreference because I removed the other) work fine?
And, back to visibility, seems to work well. If I choose to set it in the beginning, it doesn't animate, and if while the user sees it, it animates. I think it's better to give us the option, but I think it works fine this way anyway.
Attached here a proper project that uses most of the sample.
Is "onPreferenceStartScreen" new ? I never used such a thing...
It seems it allow to have multiple screens declared on the same XML file. Seems it lacks the transition between the fragments in the code there.
And why do "DropDownPreference" and "SeekBarPreference" get a warning that they aren't allowed there, even though they (or at least SeekBarPreference because I removed the other) work fine?
And, back to visibility, seems to work well. If I choose to set it in the beginning, it doesn't animate, and if while the user sees it, it animates. I think it's better to give us the option, but I think it works fine this way anyway.
Attached here a proper project that uses most of the sample.
Description
Please allow to hide a preference.