Move app settings to a different fragment

This commit is contained in:
Tommaso Berlose
2020-05-08 01:39:31 +02:00
parent 6a4cfdf22b
commit cb6c2c7764
53 changed files with 1052 additions and 747 deletions

View File

@ -8,14 +8,13 @@ import com.tommasoberlose.anotherwidget.ui.fragments.*
class ViewPagerAdapter(fragmentActivity: FragmentActivity) :
FragmentStateAdapter(fragmentActivity) {
override fun getItemCount(): Int = 5
override fun getItemCount(): Int = 4
override fun createFragment(position: Int): Fragment {
return when (position) {
1 -> CalendarSettingsFragment.newInstance()
2 -> WeatherSettingsFragment.newInstance()
3 -> ClockSettingsFragment.newInstance()
4 -> AdvancedSettingsFragment.newInstance()
else -> GeneralSettingsFragment.newInstance()
}
}