How can I call a fragment function from an activity?

前端 未结 0 963
独厮守ぢ
独厮守ぢ 2020-12-05 06:41

I want to call the loadFromSharedPreferences() function in SettingsFragment from MainActivity. How can I do that without changing ConstraintLayout to FragmentLayout? Please

相关标签:
回答
  • 消灭零回复
提交回复
热议问题