sharedpreferences - 为什么 androidx PreferenceDataStore 不工作?
问题描述
我尝试像本示例中那样使用 androidx PreferenceDataStore,但无论我尝试什么,它都不起作用。
它始终使用默认的共享首选项。
我怎样才能使它使用自定义数据存储?
解决方案
最后我修复了我的共享偏好,我不再需要 PreferenceDataStore。
推荐阅读
- python - If clause passes, even though it should be invalid
- chart.js - Datalabels of Chart JS can not display full values
- visual-studio - GitHub command 'github.copilot.generate' not found
- python - MarkerCluster does not have a tooltip feature I would like to use the Hover option to display details on clusters in python language using Folium
- xamarin.forms - Xamarin.Forms:为什么我的两侧被切断,尽管仍有空间
- azure-devops - 在 Azure Devops 中发布成功时自动更改工作项状态
- ajax - 有没有更简单的方法来允许 AJAX 加载 Wordpress 短代码?
- angular - rasa 聊天机器人无法使用 Angular 应用程序
- mysql - 如果生成为真,Loopback 4 MySQL 不允许手动为 id 列创建数据
- rdf - 根据本体验证 RDF 数据以进行一致性检查