This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#* | |
Thus begins a multi-line comment, the Velocity Templating Engine will | |
ignore it. | |
This template that can be used to quickly generate a ListAdapter and | |
DiffUtil to be used with your recyclerviews. | |
Setting imports are not essential because after the file is generated from | |
the template, the developer can always include the missing imports manually. | |
*# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.samdev.templates | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.recyclerview.widget.ListAdapter | |
import androidx.recyclerview.widget.RecyclerView | |
class PersonListAdapter : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RandomViewsFragment : Fragment() { | |
private val customNavigator = CustomNavigator() | |
/** | |
* Intercept onBackPressed | |
*/ | |
private val onBackPressedCallback : OnBackPressedCallback = object : OnBackPressedCallback(true){ | |
override fun handleOnBackPressed() { | |
back() |