dima.avdeev
2 years ago
committed by
GitHub
12 changed files with 118 additions and 184 deletions
@ -1,37 +0,0 @@ |
|||||||
package example.imageviewer.view |
|
||||||
|
|
||||||
import androidx.compose.foundation.background |
|
||||||
import androidx.compose.foundation.layout.Box |
|
||||||
import androidx.compose.foundation.layout.fillMaxSize |
|
||||||
import androidx.compose.foundation.layout.offset |
|
||||||
import androidx.compose.foundation.layout.padding |
|
||||||
import androidx.compose.foundation.layout.size |
|
||||||
import androidx.compose.foundation.shape.CircleShape |
|
||||||
import androidx.compose.material3.CircularProgressIndicator |
|
||||||
import androidx.compose.material3.MaterialTheme |
|
||||||
import androidx.compose.material3.Surface |
|
||||||
import androidx.compose.material3.Text |
|
||||||
import androidx.compose.runtime.Composable |
|
||||||
import androidx.compose.ui.Alignment |
|
||||||
import androidx.compose.ui.Modifier |
|
||||||
import androidx.compose.ui.unit.dp |
|
||||||
|
|
||||||
@Composable |
|
||||||
internal fun LoadingScreen(text: String = "") { |
|
||||||
Box( |
|
||||||
modifier = Modifier.fillMaxSize().background(color = MaterialTheme.colorScheme.background) |
|
||||||
) { |
|
||||||
Box(modifier = Modifier.align(Alignment.Center)) { |
|
||||||
Surface(/*elevation = 4.dp, */shape = CircleShape) { |
|
||||||
CircularProgressIndicator( |
|
||||||
modifier = Modifier.size(50.dp).padding(3.dp, 3.dp, 4.dp, 4.dp) |
|
||||||
) |
|
||||||
} |
|
||||||
} |
|
||||||
Text( |
|
||||||
text = text, |
|
||||||
modifier = Modifier.align(Alignment.Center).offset(0.dp, 70.dp), |
|
||||||
style = MaterialTheme.typography.bodyMedium |
|
||||||
) |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue