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
@RunWith(AndroidJUnit4::class) | |
class AppDeepLinkingTest { | |
@get:Rule | |
val activityScenarioRule = ActivityScenarioRule(MainActivity::class.java) | |
@get:Rule | |
val composeTestRule = createAndroidComposeRule<MainActivity>() | |
private lateinit var scenario: ActivityScenario<MainActivity> |
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
fun NavGraphBuilder.settingsScreen() { | |
composable( | |
route = settingsNavigationRoute, | |
deepLinks = listOf(navDeepLink { | |
uriPattern = "example://compose/settings/{id}" | |
action = Intent.ACTION_VIEW | |
}), | |
arguments = listOf( | |
navArgument("id") { | |
type = NavType.StringType |
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
@Composable | |
internal fun HomeScreenRoute( | |
modifier: Modifier = Modifier, | |
deepLinkData: String? = null | |
) { | |
HomeScreen(modifier, deepLinkData) | |
} | |
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable |
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
<activity | |
android:name=".MainActivity" | |
android:exported="true" | |
android:label="@string/app_name" | |
android:theme="@style/Theme.ComposeDeeplinkTutorial"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> |
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
@Composable | |
fun SearchEditText(modifier: Modifier) { | |
BloomTextField( | |
modifier = modifier, | |
value = "", | |
onValueChange = {}, | |
placeholder = { | |
BloomText( | |
modifier = modifier, | |
text = "Search", |
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
@Composable | |
fun BloomTextField( | |
modifier: Modifier = Modifier, | |
value: String, | |
onValueChange: (String) -> Unit, | |
leadingIcon: @Composable (() -> Unit)? = null, | |
trailingIcon: @Composable (() -> Unit)? = null, | |
placeholder: @Composable (() -> Unit)? = null, | |
visualTransformation: VisualTransformation = VisualTransformation.None, | |
keyboardOptions: KeyboardOptions = KeyboardOptions.Default, |
NewerOlder