FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Move TopicScreen strings to resources by ois0886 · Pull Request #2116 · android/nowinandroid · GitHub

Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .kt  (1) .xml  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
      • TopicScreen.kt
4 changes: 4 additions & 0 deletions feature/topic/api/src/main/res/values/strings.xml
This file contains hidden or 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
Expand Up @@ -16,4 +16,8 @@
-->
<resources>
<string name="feature_topic_api_loading">Loading topic</string>
<string name="feature_topic_api_loading_news">Loading news</string>
<string name="feature_topic_api_news_error">Error</string>
<string name="feature_topic_api_following">Following</string>
<string name="feature_topic_api_not_following">Not following</string>
</resources>
This file contains hidden or 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
Expand Up @@ -68,6 +68,7 @@ import com.google.samples.apps.nowinandroid.core.ui.TrackScreenViewEvent
import com.google.samples.apps.nowinandroid.core.ui.TrackScrollJank
import com.google.samples.apps.nowinandroid.core.ui.UserNewsResourcePreviewParameterProvider
import com.google.samples.apps.nowinandroid.core.ui.userNewsResourceCardItems
import java.util.Locale
import com.google.samples.apps.nowinandroid.core.ui.R as UiR
import com.google.samples.apps.nowinandroid.feature.topic.api.R as TopicR

Expand Down Expand Up @@ -246,11 +247,11 @@ private fun LazyListScope.userNewsResourceCards(
}

is NewsUiState.Loading -> item {
NiaLoadingWheel(contentDesc = "Loading news") // TODO
NiaLoadingWheel(contentDesc = stringResource(TopicR.string.feature_topic_api_loading_news))
}

else -> item {
Text("Error") // TODO
Text(stringResource(TopicR.string.feature_topic_api_news_error))
}
}
}
Expand Down Expand Up @@ -308,9 +309,9 @@ private fun TopicToolbar(
modifier = Modifier.padding(end = 24.dp),
) {
if (selected) {
Text("FOLLOWING")
Text(stringResource(TopicR.string.feature_topic_api_following).uppercase(Locale.getDefault()))
} else {
Text("NOT FOLLOWING")
Text(stringResource(TopicR.string.feature_topic_api_not_following).uppercase(Locale.getDefault()))
}
}
}
Expand Down

Back | FazBrowse Home | New Git URL