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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions feature/topic/api/src/main/res/values/strings.xml
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>
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