feat: long tap like button to see users
This commit is contained in:
parent
c5abfa15e0
commit
5dbc01dba3
11 changed files with 186 additions and 41 deletions
|
@ -0,0 +1,41 @@
|
|||
package ani.dantotsu.profile
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import ani.dantotsu.BottomSheetDialogFragment
|
||||
import ani.dantotsu.databinding.BottomSheetUsersBinding
|
||||
import ani.dantotsu.profile.activity.UsersAdapter
|
||||
import ani.dantotsu.settings.DevelopersAdapter
|
||||
|
||||
|
||||
class UsersDialogFragment : BottomSheetDialogFragment() {
|
||||
private var _binding: BottomSheetUsersBinding? = null
|
||||
private val binding get() = _binding!!
|
||||
|
||||
private var userList = arrayListOf<User>()
|
||||
fun userList(user: ArrayList<User>){
|
||||
userList = user
|
||||
}
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = BottomSheetUsersBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.usersRecyclerView.adapter = UsersAdapter(userList)
|
||||
binding.usersRecyclerView.layoutManager = LinearLayoutManager(requireContext())
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
_binding = null
|
||||
super.onDestroy()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue