File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
app/src/main/kotlin/com/hana053/micropost/pages Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,20 @@ interface Presenter<out T : ViewWrapper> {
1515 fun bind ()
1616
1717 fun <T > Observable<T>.withProgressDialog (): Observable <T > = Observable .using({
18- ProgressBar (view.context() , null , android.R .attr.progressBarStyle).apply {
18+ val progressBar = ProgressBar (view.content. context, null , android.R .attr.progressBarStyle).apply {
1919 isIndeterminate = true
2020 visibility = View .VISIBLE
21-
22- val rl = RelativeLayout (view.content.context).apply {
23- gravity = Gravity .CENTER
24- addView(this @apply)
25- }
26- val layoutParams = RelativeLayout .LayoutParams (
27- RelativeLayout .LayoutParams .MATCH_PARENT ,
28- RelativeLayout .LayoutParams .MATCH_PARENT
29- )
30- view.content.addView(rl, layoutParams)
3121 }
22+ val rl = RelativeLayout (view.content.context).apply {
23+ gravity = Gravity .CENTER
24+ addView(progressBar)
25+ }
26+ val layoutParams = RelativeLayout .LayoutParams (
27+ RelativeLayout .LayoutParams .MATCH_PARENT ,
28+ RelativeLayout .LayoutParams .MATCH_PARENT
29+ )
30+ view.content.addView(rl, layoutParams)
31+ progressBar
3232 }, { this }, {
3333 it.visibility = View .GONE
3434 })
You can’t perform that action at this time.
0 commit comments