-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ErrOnLoginScreen and empty recipe list placeholder surface
- Loading branch information
Cody Weaver
authored and
Cody Weaver
committed
Jan 5, 2024
1 parent
bfdb2c2
commit 2ba9ea1
Showing
12 changed files
with
145 additions
and
35 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
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
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
62 changes: 62 additions & 0 deletions
62
app/src/main/java/com/android/pocketalchemy/login/ErrOnLoginScreen.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,62 @@ | ||
package com.android.pocketalchemy.login | ||
|
||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.unit.dp | ||
import com.android.pocketalchemy.R | ||
|
||
@Composable | ||
fun ErrOnLoginScreen( | ||
onNavigateToLoginScreen: () -> Unit | ||
) { | ||
Surface( | ||
color = MaterialTheme.colorScheme.primaryContainer, | ||
contentColor = MaterialTheme.colorScheme.onPrimaryContainer, | ||
modifier = Modifier.fillMaxSize(1f) | ||
) { | ||
|
||
Box ( | ||
modifier = Modifier.padding(16.dp) | ||
) { | ||
Column( | ||
modifier = Modifier.align(Alignment.Center) | ||
.padding(16.dp) | ||
) { | ||
Text( | ||
text = stringResource(id = R.string.app_name), | ||
modifier = Modifier.align(Alignment.CenterHorizontally), | ||
style = MaterialTheme.typography.headlineLarge, | ||
fontWeight = FontWeight.ExtraBold, | ||
textAlign = TextAlign.Center, | ||
) | ||
Text( | ||
text = stringResource(R.string.err_on_login_msg), | ||
modifier = Modifier.align(Alignment.CenterHorizontally) | ||
.fillMaxWidth(.75f), | ||
textAlign = TextAlign.Center | ||
) | ||
TextButton( | ||
onClick = onNavigateToLoginScreen, | ||
modifier = Modifier.align(Alignment.CenterHorizontally) | ||
) { | ||
Text( | ||
text = stringResource(R.string.back_to_login_label) | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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