fix: fragment IllegalStateException
This commit is contained in:
parent
b373a52218
commit
25b85569fe
1 changed files with 6 additions and 6 deletions
|
@ -76,7 +76,7 @@ class ProfileFragment : Fragment() {
|
|||
)
|
||||
binding.profileUserBio.setBackgroundColor(
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
activity,
|
||||
android.R.color.transparent
|
||||
)
|
||||
)
|
||||
|
@ -86,7 +86,7 @@ class ProfileFragment : Fragment() {
|
|||
super.onPageFinished(view, url)
|
||||
binding.profileUserBio.setBackgroundColor(
|
||||
ContextCompat.getColor(
|
||||
requireContext(),
|
||||
activity,
|
||||
android.R.color.transparent
|
||||
)
|
||||
)
|
||||
|
@ -146,7 +146,7 @@ class ProfileFragment : Fragment() {
|
|||
}
|
||||
binding.profileFavStaffRecycler.adapter = AuthorAdapter(favStaff)
|
||||
binding.profileFavStaffRecycler.layoutManager = LinearLayoutManager(
|
||||
requireContext(),
|
||||
activity,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
|
@ -155,7 +155,7 @@ class ProfileFragment : Fragment() {
|
|||
}
|
||||
binding.profileFavCharactersRecycler.adapter = CharacterAdapter(favCharacter)
|
||||
binding.profileFavCharactersRecycler.layoutManager = LinearLayoutManager(
|
||||
requireContext(),
|
||||
activity,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
|
@ -177,9 +177,9 @@ class ProfileFragment : Fragment() {
|
|||
recyclerView.visibility = View.GONE
|
||||
if (it != null) {
|
||||
if (it.isNotEmpty()) {
|
||||
recyclerView.adapter = MediaAdaptor(0, it, requireActivity(), fav=true)
|
||||
recyclerView.adapter = MediaAdaptor(0, it, activity, fav=true)
|
||||
recyclerView.layoutManager = LinearLayoutManager(
|
||||
requireContext(),
|
||||
activity,
|
||||
LinearLayoutManager.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue