Skip to content

Commit

Permalink
Fix progress bar on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamlooker committed Jan 1, 2025
1 parent ae3bffb commit f4a3bb0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ class AppListAdapter(
init {
with(itemView as FrameLayout) {
val progressBar = CircularProgressIndicator(context)
addView(progressBar)
progressBar.isIndeterminate = true
addView(
progressBar,
FrameLayout.LayoutParams(
FrameLayout.LayoutParams.WRAP_CONTENT,
FrameLayout.LayoutParams.WRAP_CONTENT,
).apply { gravity = Gravity.CENTER }
)
layoutParams = RecyclerView.LayoutParams(
RecyclerView.LayoutParams.MATCH_PARENT,
RecyclerView.LayoutParams.MATCH_PARENT
Expand Down

0 comments on commit f4a3bb0

Please sign in to comment.