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(
|
binding.profileUserBio.setBackgroundColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
requireContext(),
|
activity,
|
||||||
android.R.color.transparent
|
android.R.color.transparent
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -86,7 +86,7 @@ class ProfileFragment : Fragment() {
|
||||||
super.onPageFinished(view, url)
|
super.onPageFinished(view, url)
|
||||||
binding.profileUserBio.setBackgroundColor(
|
binding.profileUserBio.setBackgroundColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
requireContext(),
|
activity,
|
||||||
android.R.color.transparent
|
android.R.color.transparent
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -146,7 +146,7 @@ class ProfileFragment : Fragment() {
|
||||||
}
|
}
|
||||||
binding.profileFavStaffRecycler.adapter = AuthorAdapter(favStaff)
|
binding.profileFavStaffRecycler.adapter = AuthorAdapter(favStaff)
|
||||||
binding.profileFavStaffRecycler.layoutManager = LinearLayoutManager(
|
binding.profileFavStaffRecycler.layoutManager = LinearLayoutManager(
|
||||||
requireContext(),
|
activity,
|
||||||
LinearLayoutManager.HORIZONTAL,
|
LinearLayoutManager.HORIZONTAL,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
@ -155,7 +155,7 @@ class ProfileFragment : Fragment() {
|
||||||
}
|
}
|
||||||
binding.profileFavCharactersRecycler.adapter = CharacterAdapter(favCharacter)
|
binding.profileFavCharactersRecycler.adapter = CharacterAdapter(favCharacter)
|
||||||
binding.profileFavCharactersRecycler.layoutManager = LinearLayoutManager(
|
binding.profileFavCharactersRecycler.layoutManager = LinearLayoutManager(
|
||||||
requireContext(),
|
activity,
|
||||||
LinearLayoutManager.HORIZONTAL,
|
LinearLayoutManager.HORIZONTAL,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
@ -177,9 +177,9 @@ class ProfileFragment : Fragment() {
|
||||||
recyclerView.visibility = View.GONE
|
recyclerView.visibility = View.GONE
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
if (it.isNotEmpty()) {
|
if (it.isNotEmpty()) {
|
||||||
recyclerView.adapter = MediaAdaptor(0, it, requireActivity(), fav=true)
|
recyclerView.adapter = MediaAdaptor(0, it, activity, fav=true)
|
||||||
recyclerView.layoutManager = LinearLayoutManager(
|
recyclerView.layoutManager = LinearLayoutManager(
|
||||||
requireContext(),
|
activity,
|
||||||
LinearLayoutManager.HORIZONTAL,
|
LinearLayoutManager.HORIZONTAL,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue