A fully functional Android app built entirely with Kotlin and Jetpack Compose
Improve internalization
Rob Orgiu650471b1c2bf
diff --git a/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt b/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.ktindex 4aaa4f7ad..7c41d74d0 100644--- a/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt+++ b/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt@@ -97,6 +97,12 @@ fun NewsResourceCardExpanded(modifier: Modifier = Modifier,) {val clickActionLabel = stringResource(R.string.core_ui_card_tap_action)+ val sharingLabel = stringResource(R.string.core_ui_feed_sharing)+ val sharingContent = stringResource(+ R.string.core_ui_feed_sharing_data,+ userNewsResource.title,+ userNewsResource.url,+ )val dragAndDropFlags = if (VERSION.SDK_INT >= VERSION_CODES.N) {View.DRAG_FLAG_GLOBAL@@ -128,15 +134,16 @@ fun NewsResourceCardExpanded(Row {NewsResourceTitle(userNewsResource.title,- modifier = Modifier.fillMaxWidth((.8f))+ modifier = Modifier+ .fillMaxWidth((.8f)).dragAndDropSource {detectTapGestures(onLongPress = {startTransfer(DragAndDropTransferData(ClipData.newPlainText(- "Feed sharing",- userNewsResource.title + ": " + userNewsResource.url,+ sharingLabel,+ sharingContent,),flags = dragAndDropFlags,),diff --git a/core/ui/src/main/res/values/strings.xml b/core/ui/src/main/res/values/strings.xmlindex ab76748ef..a97746a9c 100644--- a/core/ui/src/main/res/values/strings.xml+++ b/core/ui/src/main/res/values/strings.xml@@ -29,4 +29,6 @@<string name="core_ui_interests_card_follow_button_content_desc">Follow interest</string><string name="core_ui_interests_card_unfollow_button_content_desc">Unfollow interest</string>+ <string name="core_ui_feed_sharing">Feed sharing</string>+ <string name="core_ui_feed_sharing_data">%1$s: %2$s</string></resources>