-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PopupLoadingIndicator to fill the entire screen
- Loading branch information
Maik Mursall
committed
Aug 15, 2022
1 parent
dea8be2
commit 371cbac
Showing
5 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...xs2awizard/components/LoadingIndicator.kt → ...ents/loadingIndicator/LoadingIndicator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...in/java/com/fintecsystems/xs2awizard/components/loadingIndicator/PopupLoadingIndicator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.fintecsystems.xs2awizard.components.loadingIndicator | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.IntOffset | ||
import androidx.compose.ui.unit.IntRect | ||
import androidx.compose.ui.unit.IntSize | ||
import androidx.compose.ui.unit.LayoutDirection | ||
import androidx.compose.ui.window.Popup | ||
import androidx.compose.ui.window.PopupPositionProvider | ||
|
||
@Composable | ||
fun PopupLoadingIndicator( | ||
modifier: Modifier = Modifier, | ||
) { | ||
val popupPositionProvider = object : PopupPositionProvider { | ||
override fun calculatePosition( | ||
anchorBounds: IntRect, | ||
windowSize: IntSize, | ||
layoutDirection: LayoutDirection, | ||
popupContentSize: IntSize | ||
): IntOffset { | ||
return IntOffset.Zero | ||
} | ||
} | ||
|
||
Popup(popupPositionProvider = popupPositionProvider) { | ||
LoadingIndicator(modifier) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters