Fixed category filter
This commit is contained in:
parent
f18d7ad1e0
commit
37e52b3f2f
|
@ -332,6 +332,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
||||||
adapter.addFragment(CategoriesFragment(), getString(R.string.categories_title))
|
adapter.addFragment(CategoriesFragment(), getString(R.string.categories_title))
|
||||||
|
|
||||||
viewpager.adapter = adapter
|
viewpager.adapter = adapter
|
||||||
|
viewpager.offscreenPageLimit = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
|
|
@ -35,7 +35,7 @@ class CategoriesFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun prepareDatabaseConnection() {
|
private fun prepareDatabaseConnection() {
|
||||||
val dbHelper = DBStorageController(requireContext(), sharedPreferences.getString("currentGroup", "database")!!)
|
val dbHelper = DBStorageController(requireContext(), sharedPreferences.getString("currentGroup", "offline")!!)
|
||||||
categoryDAO = CategoryDAO(dbHelper)
|
categoryDAO = CategoryDAO(dbHelper)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue