0

Suppose you apply the following architecture in your Android project: View - ViewModel - UseCase - Repository and you have to display some text from the UseCase layer to the View layer. However, this text some times is of type String and some times is of type Int (stringResource).

What is the best practice to handle this?

1
  • which component is providing you with the data String, Int ? Commented Sep 28, 2022 at 14:58

1 Answer 1

0

Maybe you can try type Any and set case to decalre type as String || as Int

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.