|
@@ -4,7 +4,6 @@ import android.view.LayoutInflater
|
|
|
import android.view.Menu
|
|
|
import android.view.MenuItem
|
|
|
import android.view.View
|
|
|
-import android.view.ViewGroup
|
|
|
import androidx.appcompat.app.AppCompatActivity
|
|
|
import androidx.appcompat.view.ActionMode
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager
|
|
@@ -68,21 +67,7 @@ class CategoryController :
|
|
|
return resources?.getString(R.string.action_edit_categories)
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Returns the view of this controller.
|
|
|
- *
|
|
|
- * @param inflater The layout inflater to create the view from XML.
|
|
|
- * @param container The parent view for this one.
|
|
|
- */
|
|
|
- override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View {
|
|
|
- binding = CategoriesControllerBinding.inflate(inflater)
|
|
|
- binding.recycler.applyInsetter {
|
|
|
- type(navigationBars = true) {
|
|
|
- padding()
|
|
|
- }
|
|
|
- }
|
|
|
- return binding.root
|
|
|
- }
|
|
|
+ override fun createBinding(inflater: LayoutInflater) = CategoriesControllerBinding.inflate(inflater)
|
|
|
|
|
|
/**
|
|
|
* Called after view inflation. Used to initialize the view.
|
|
@@ -92,6 +77,12 @@ class CategoryController :
|
|
|
override fun onViewCreated(view: View) {
|
|
|
super.onViewCreated(view)
|
|
|
|
|
|
+ binding.recycler.applyInsetter {
|
|
|
+ type(navigationBars = true) {
|
|
|
+ padding()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
adapter = CategoryAdapter(this@CategoryController)
|
|
|
binding.recycler.layoutManager = LinearLayoutManager(view.context)
|
|
|
binding.recycler.setHasFixedSize(true)
|